Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-26-2009, 06:20 AM
Member
 
Join Date: Aug 2007
Posts: 38
Rep Power: 0
Gajesh Tripathi is on a distinguished road
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 Images:
File Type: jpg desktop_app.JPG (97.3 KB, 4 views)
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 06-26-2009, 07:21 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,256
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-26-2009, 10:35 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 483
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-26-2009, 04:12 PM
Member
 
Join Date: Aug 2007
Posts: 38
Rep Power: 0
Gajesh Tripathi is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-26-2009, 06:45 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,256
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 06-26-2009, 06:45 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,256
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #7 (permalink)  
Old 06-26-2009, 10:58 PM
Darryl.Burke's Avatar
Senior Member
 
Join Date: Sep 2008
Location: Madgaon, Goa, India
Posts: 662
Rep Power: 2
Darryl.Burke is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #8 (permalink)  
Old 06-27-2009, 12:43 PM
Member
 
Join Date: Aug 2007
Posts: 38
Rep Power: 0
Gajesh Tripathi is on a distinguished road
Default JLabel can not be slected
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.


Quote:
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.
Bookmark Post in Technorati
Reply With Quote
  #9 (permalink)  
Old 06-27-2009, 06:53 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,256
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
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.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #10 (permalink)  
Old 06-28-2009, 03:23 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 483
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
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
Bookmark Post in Technorati
Reply With Quote
  #11 (permalink)  
Old 06-28-2009, 08:53 AM
Member
 
Join Date: Aug 2007
Posts: 38
Rep Power: 0
Gajesh Tripathi is on a distinguished road
Default
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
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
Bookmark Post in Technorati
Reply With Quote
  #12 (permalink)  
Old 06-28-2009, 11:29 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 483
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
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.
Bookmark Post in Technorati
Reply With Quote
  #13 (permalink)  
Old 06-29-2009, 10:43 AM
Member
 
Join Date: Aug 2007
Posts: 38
Rep Power: 0
Gajesh Tripathi is on a distinguished road
Smile [SOLVED] Desktop Icons Application
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}

Quote:
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:
File Type: zip UtilityPrograms.zip (36.2 KB, 4 views)
File Type: txt TestDesktopApp.txt (11.3 KB, 0 views)

Last edited by Gajesh Tripathi; 06-29-2009 at 12:01 PM. Reason: Forgot to attach source file
Bookmark Post in Technorati
Reply With Quote
  #14 (permalink)  
Old 07-01-2009, 10:40 AM
serjant's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Ukraine,Zaporozhye
Posts: 483
Rep Power: 2
serjant is on a distinguished road
Send a message via ICQ to serjant Send a message via Skype™ to serjant
Default
Quote:
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
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to compare icons panic New To Java 9 05-21-2009 09:16 AM
is there anyone how can help me with image icons please? xbox_nutter New To Java 4 03-27-2009 11:26 AM
[SOLVED] Turkish Characters in Java desktop Swing applications? doganc Advanced Java 6 03-06-2009 10:51 PM
[SOLVED] Icons path janpol1 Eclipse 1 03-03-2009 01:31 PM
Moving icons on your desktop Leprechaun New To Java 3 12-14-2007 11:07 AM


All times are GMT +2. The time now is 05:53 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org