Results 1 to 4 of 4
  1. #1
    markos85 is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default Java Swing - Java i/o

    to moderators - delete this Thred
    Last edited by markos85; 03-13-2009 at 11:38 AM.

  2. #2
    viswanadh7 is offline Member
    Join Date
    Mar 2009
    Posts
    10
    Rep Power
    0

    Default

    use setIcon function for directly putting a required icon onto the JLabel along with an actionlistener.:)

  3. #3
    markos85 is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Default

    You did not understand me

    in first circle i want to user see path of directory where he is at that moment

    in second circle i want to user see size and last modified ,of file what is selected

    p.s. i did not posted 20 messages ,and i can not send PM's and post a link

    how want to help me my MSN is : markossss@live(dot)com

  4. #4
    viswanadh7 is offline Member
    Join Date
    Mar 2009
    Posts
    10
    Rep Power
    0

    Default

    Open the jdk API and go into java.io package and use these methods for your task.
    :):):):)
    Java Code:
    File f=new File();
    
    1) f.getAbsolutePath() for getting the path.
    2) String s=f.length() for getting the size of the file.
    
    3)File f1=new File(s1);
       File f2=new File(s2);
    
    Where s1 and s2 are two different strings or filenames..etc.
    if(f1.lastModified() <  f2.lastModified())
    {
    System.out.println("s1+"is older than"+s2);
    }

Similar Threads

  1. java.swing.popup not hiding
    By pinks_70986 in forum AWT / Swing
    Replies: 1
    Last Post: 02-11-2009, 08:35 PM
  2. GUI Designer for Swing/Java
    By balajishenbagarajan in forum AWT / Swing
    Replies: 20
    Last Post: 01-27-2009, 12:17 AM
  3. Java Swing
    By RAMYA in forum New To Java
    Replies: 3
    Last Post: 11-12-2008, 07:00 AM
  4. Java Swing Tutorial
    By JavaBean in forum Java Tutorial
    Replies: 0
    Last Post: 09-22-2007, 09:06 PM
  5. Java Swing
    By JavaBean in forum Java Tutorial
    Replies: 0
    Last Post: 09-22-2007, 08:08 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •