Wrox Programmer Forums
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 26th, 2003, 08:50 AM
Registered User
 
Join Date: Oct 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default JToolbar

I only get the labels on my toolbarbuttons, and not my icons.
the icons are in a directory Images, but when using "Images/open.gif", it won't work. (like in bginning java2: JDK 1.3: sketcher application)when using setText(null), I only get some raised pixels (actions on this still work though), but nothing more.
can someone help me?

 
Old October 31st, 2003, 07:59 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

Quote:
quote:Originally posted by koekke
 I only get the labels on my toolbarbuttons, and not my icons.
the icons are in a directory Images, but when using "Images/open.gif", it won't work. (like in bginning java2: JDK 1.3: sketcher application)when using setText(null), I only get some raised pixels (actions on this still work though), but nothing more.
can someone help me?

Are you sure the Icons are loading? i.e. have you tried drawing them in a window or setting them on a button? See if you are getting an IOException...

Regards,
Meredith Shaebanyan

 
Old November 12th, 2003, 03:31 AM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

In Java 2 book, page 775, they gave URL address to get gif files
for ToolBar icons (open, print, etc). I went to their site to
download it but the site did not have it.
(http://www.wrox.com/Consumer/Store/Download.asp).

Where can I find the gif files for icons used to JToolBar for GUI
design? You can email me at ssavkar00@yahoo.com

Thanks.
SameerAre you sure the Icons are loading? i.e. have you tried drawing them in a window or setting them on a button? See if you are getting an IOException...

Regards,
Meredith Shaebanyan


[/quote]

 
Old November 17th, 2003, 08:46 AM
Authorized User
 
Join Date: Oct 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here you go...

JToolBar toolBar = new JToolBar();

JButton stock = new JButton(new ImageIcon("com/objectpro/smartforex/images/stock.gif"));
toolBar.add(stock);


Thanks and Regards,
rpalani
 
Old November 21st, 2003, 04:50 PM
Registered User
 
Join Date: Nov 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Where can I find the gif files for icons used in JToolBar for GUI
design? The Gifs like open, print, etc are available where?
On pg page 775, they gave URL address to get gif files
for ToolBar icons (open, print, etc). I went to their site to
download it but the site did not have it.
(http://www.wrox.com/Consumer/Store/Download.asp).

Please give the location where I can find the gif files. Thanks.


 
Old February 17th, 2004, 07:10 PM
Authorized User
 
Join Date: Jul 2003
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to merediths
Default

Check out Sun's javasoft site ( java.sun.com ) -- I don't have the exact URL, however they have available a package of icons for use with Swing which includes all the standard open/save/save as / print /etc. icons. If you use those you will have the benefit of having a standard UI that users of other Swing applications will understand intuitivley.

Regards,
Meredith Shaebanyan

 
Old March 19th, 2004, 11:54 AM
Registered User
 
Join Date: Mar 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Pay attention to
Interface & Implements










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.