Search:

Type: Posts; User: BlueSuicidal

Search: Search took 0.32 seconds.

  1. Replies
    15
    Views
    2,777

    Re: Show files name in JFrame

    Or in your code Start.f gets called when the JPanel is painted. But is not initialized because of ReadDirectory().
  2. Replies
    15
    Views
    2,777

    Re: Show files name in JFrame

    Hi again,

    I have looked at the code.

    The paint method is called:


    In your program the m_string has not been initialized when you call your constructor ReadDirectory() { from...
  3. Replies
    15
    Views
    2,777

    Re: Show files name in JFrame

    It counts the directories in the listofFiles also. not only the files


    check the output lke this:
    System.out.println(listOfFiles[i].toString());
  4. Replies
    15
    Views
    2,777

    Re: Show files name in JFrame

    Hi

    Looked again it just works like this:


    package filenameresource2;

    //class ReadDirectory
    import java.awt.*;
    import javax.swing.*;
  5. Replies
    15
    Views
    2,777

    Re: Show files name in JFrame

    Hi,
    The code you entered makes 2 frames. This isn't working yet.

    I have picked some code from the internet. You should be able to print directories in the console by using the link and the...
  6. Replies
    3
    Views
    690

    Re: keylistner + applet isnt working

    Sorry Brandon95 KeyDown is depricated. You should make a KeyListener.

    How to Write a Key Listener (The Java™ Tutorials > Creating a GUI With JFC/Swing > Writing Event Listeners)


    import...
  7. Replies
    3
    Views
    690

    Re: keylistner + applet isnt working

    Hi,

    I think you should implement the Keydown method of the applet's component class.

    I googled:
    Small Game With KeyListener - Java | Dream.In.Code


    public boolean keyDown (Event e, int...
  8. Re: Get JPrintPreviewDialog for button response

    import java.awt.event.WindowEvent;
    import javax.swing.SwingUtilities;

    /**
    *
    * @author Gebruiker
    */
    public class JMenuPanel extends javax.swing.JPanel {

    /** Creates new form...
  9. Get JPrintPreviewDialog for button response

    I am trying to program a GUI for my own print preview dailog. The Frame just opens a dialog and passes a Image object to it.


    public class JPrintPreviewDialog extends JDialog{

    public...
Results 1 to 9 of 9