Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2007
    Posts
    45
    Rep Power
    0

    Question Desktop Icons Applications

    I have some utilities programs (.jar files that are made in java) for personnel department...Presently I provide the icons of .jar files to the user. Now, I want to club all classes within these .jar files into one single java program.
    But I do not want to use Menu Bar OR Tool Bar. Instead, I want to use a desktop screen that contains icons for executing my programs by double click and one status bar that will show Information about my program

    How can do such kind of desktop application in JAVA?
    JDesktopPane is used for desktop application but I want to put icon within it.

    You may understand my exact requirement by attached image.
    I also provide you link of program:-
    Share your files quickly, secure and easy (simillar program, i want to create in JAVA)

    please give me some idea...
    Attached Thumbnails Attached Thumbnails Desktop Icons Applications-desktop_app.jpg  

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Use a JFrame with undecorated false. Once you set it to false, you cannot see any title bar on the top. Even in default you can't see menu bars in JFrame. Set the size dynamically to same as the desktop you want to place on.

  3. #3
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    You can also make a transparent JPanel,drawing on the JPanel an image area which is at the back of the undecorated JFrame, to add the WindowListener to the JFrame, each time when you move the JFrame update this image, such way you will get a transparent window, I did much desktop widgets in this way

  4. #4
    Join Date
    Aug 2007
    Posts
    45
    Rep Power
    0

    Default

    Thanks for suggessions.
    I want to put images/icons with caption into Desktop Pane
    Drawing the image in panel is very tough process. Is there any eaisest way as like we can see in VB language where image control is found to place directly into form.

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    The way serjant explain is really nice.

    On the other way, which I explain you can use labels easily on the frame, and add images to those labels. That's the most easiest way I can see.

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    The way serjant explain is really nice.

    On the other way, which I explain you can use labels easily on the frame, and add images to those labels. That's the most easiest way I can see.

  7. #7
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default

    Use a GridLayout with JButtons that have setContentAreaFilled(false) and setBorderPainted(false). You may also want to setRolloverEnabled(false).

    Set an icon and text to each button, and setHorizontalTextPosition(SwingConstants.CENTER) / setVerticalTextPosition(SwingConstants.TOP)

    db

  8. #8
    Join Date
    Aug 2007
    Posts
    45
    Rep Power
    0

    Default JLabel can not be slected

    Quote Originally Posted by Eranga View Post
    The way serjant explain is really nice.

    On the other way, which I explain you can use labels easily on the frame, and add images to those labels. That's the most easiest way I can see.
    I have already tried it but Two problem with Label is:-
    1. We can not select JLable
    2. Text/Caption is not appearing at the bottom of Image Label however text position property is set.


    Use a GridLayout with JButtons that have setContentAreaFilled(false) and setBorderPainted(false). You may also want to setRolloverEnabled(false).

    Set an icon and text to each button, and setHorizontalTextPosition(SwingConstants.CENTER) / setVerticalTextPosition(SwingConstants.TOP)
    Thanks Burke, I will try it; I hope JButton is best to solve my problem and your idea will work.

  9. #9
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by Gajesh Tripathi View Post
    I have already tried it but Two problem with Label is:-
    1. We can not select JLable
    You mean that you cannot work on with the click event on JLabel. Actually you can do that, simply add mouse listener to the label and override corresponding methods. If you still confused let me know. I'll show you a simple example.

  10. #10
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    A year ago I made some Carousel widget(transparent) where you can add launch applications, I will attach it here tomorrow, you can use it free it

  11. #11
    Join Date
    Aug 2007
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by Eranga View Post
    You mean that you cannot work on with the click event on JLabel. Actually you can do that, simply add mouse listener to the label and override corresponding methods. If you still confused let me know. I'll show you a simple example.
    Sir, I know the uses of mouse listener with JLabel...my meant that when we click on image/icon then it should be look like selected which is not possible with JLabel...Please download the .exe file from CALCULATIONS.exe and then execute it to better understand my problem....Thanks
    Quote Originally Posted by serjant View Post
    A year ago I made some Carousel widget(transparent) where you can add launch applications, I will attach it here tomorrow, you can use it free it
    I am waiting serjant...
    Last edited by Gajesh Tripathi; 06-28-2009 at 09:36 AM. Reason: Wrong Link was provided

  12. #12
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Here is the jar file:
    Carousel.jar

    The launchers will not launch the programs, because they are initiated for Linux, but you can edit them in CarouselFinal.java class :
    http://rapidshare.com/files/24950544...ck.tar.gz.html

    Open the project in Eclipse, Open CarouselFinal class, String[] commands array is the array where you insert the launch command for the application,
    carousel.add command adds image and the name of the application. If there are any questions, contact me. I think this application will help you
    Here is the source:
    Last edited by serjant; 06-28-2009 at 11:31 AM.

  13. #13
    Join Date
    Aug 2007
    Posts
    45
    Rep Power
    0

    Smile [SOLVED] Desktop Icons Application

    Quote Originally Posted by Darryl.Burke View Post
    Use a GridLayout with JButtons that have setContentAreaFilled(false) and setBorderPainted(false). You may also want to setRolloverEnabled(false).

    Set an icon and text to each button, and setHorizontalTextPosition(SwingConstants.CENTER) / setVerticalTextPosition(SwingConstants.TOP)
    Dear Brova, My problem is solved after using your concept with JButton....Thank you very much.

    I made a sample program that fulfill my requirement (as per Brova's suggession) and it will be helpful for others that want to create simillar desktop icon application. Please note that I did not register any action listener for buttons. Instead, I used key listener on button: Left,Right,Up,Down key to transfer focus & Enter key to call double click mouse event for that button. {.jar file is also attached to execute this sample program directly}

    but you can edit them in CarouselFinal.java class
    RapidShare: Easy Filehosting
    Dear Serjant, Your program is very impresive. Please provide me .zip link for CarouselFinal.java to open with Windows
    Attached Files Attached Files
    Last edited by Gajesh Tripathi; 06-29-2009 at 12:01 PM. Reason: Forgot to attach source file

  14. #14
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    Dear Serjant, Your program is very impresive. Please provide me .zip link for CarouselFinal.java to open with Windows
    There is nothing to do, open CarouselFinal .java from the archive i gave you, and edit windows command in the array: String[] commands

Similar Threads

  1. how to compare icons
    By panic in forum New To Java
    Replies: 9
    Last Post: 05-21-2009, 09:16 AM
  2. is there anyone how can help me with image icons please?
    By xbox_nutter in forum New To Java
    Replies: 4
    Last Post: 03-27-2009, 11:26 AM
  3. Replies: 6
    Last Post: 03-06-2009, 10:51 PM
  4. [SOLVED] Icons path
    By janpol1 in forum Eclipse
    Replies: 1
    Last Post: 03-03-2009, 01:31 PM
  5. Moving icons on your desktop
    By Leprechaun in forum New To Java
    Replies: 3
    Last Post: 12-14-2007, 11:07 AM

Posting Permissions

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