Results 1 to 2 of 2
Thread: Help with radiobutton!
- 05-09-2010, 04:09 PM #1
Member
- Join Date
- Apr 2010
- Location
- Cambridge
- Posts
- 30
- Rep Power
- 0
Help with radiobutton!
Hello there im struggling to add a radiobutton formula to my project.
What i finally aim to create is a small map of my college, which has a radiobutton with two colums, this can be used to find out the distance between college hotspots.
To do this i have created several different maps with hotspots on them, when the two radiolabel colums are filled out, this will show a picture of the map with the two hotspots highlighted.
I feel i have everything setup perfectly, however my createImageIcon is not working and it's frustrating me as i do not know what i am doing wrong!
Heres a snippet!
Any help would be appreciated!Java Code:picture.setIcon([COLOR="Red"]createImageIcon[/COLOR]("image\" + receptionString + ".png")); picture.setPreferredSize(new Dimension(177, 122)); map.add(receptionbutton); map.add(map, BorderLayout.LINE_START); map.add(picture, BorderLayout.CENTER);
-
Are you sure that the program is looking in the right spot for the images? Do you know what the user directory for this app is? Is it Jar'd or an applet?
To find the user directory, have this line of code run:
and this may be the base path where your program starts looking for the icon.Java Code:System.out.println(System.getProperty("user.dir"));
Similar Threads
-
RadioButton clearSelection Problem
By Aniczka in forum New To JavaReplies: 3Last Post: 10-31-2009, 02:26 PM -
uses of radiobutton...
By mlibot in forum New To JavaReplies: 22Last Post: 09-17-2009, 08:33 AM -
freeze radioButton without disable them
By itaipee in forum AWT / SwingReplies: 5Last Post: 05-25-2009, 09:29 AM -
RadioButton
By tiger100plus in forum New To JavaReplies: 1Last Post: 01-05-2009, 08:04 PM -
radiobutton selection
By newtojava7 in forum New To JavaReplies: 1Last Post: 03-17-2008, 02:58 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks