Results 1 to 3 of 3
Thread: ComboBox Error
- 04-10-2012, 08:22 PM #1
Member
- Join Date
- Mar 2012
- Posts
- 23
- Rep Power
- 0
ComboBox Error
Hey, I'm having problems when trying to put a combobox into my program. When ever I use the following code for a comboBox I just keep getting the same error as below when compiling, then a screen full of text in the cmd (nothing runs), Id I comment it out the program runs fine. Is this a general problem to do with my code or something else? Thanks.
Java Code:String custAge[] = {"1","2","3","4"}; JComboBox combo = new JComboBox(custAge); optionPanel.add(combo);
Error:
Note: H:\Booking.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Tool completed successfully
- 04-10-2012, 08:28 PM #2
Senior Member
- Join Date
- Oct 2010
- Location
- Germany
- Posts
- 780
- Rep Power
- 4
Re: ComboBox Error
Thats only a warning message, no error message! You are using Java 7 or?
-> Try to use the generic way: JComboBox<String> combo = new JComboBox<String>(custAge);
- 04-10-2012, 08:31 PM #3
Member
- Join Date
- Mar 2012
- Posts
- 23
- Rep Power
- 0
Similar Threads
-
Combobox
By asai in forum New To JavaReplies: 5Last Post: 02-21-2012, 07:11 PM -
combobox
By dina in forum AWT / SwingReplies: 7Last Post: 05-11-2011, 05:31 PM -
combobox
By leader in forum New To JavaReplies: 2Last Post: 02-12-2011, 09:30 PM -
Need Help combobox
By kwink in forum AWT / SwingReplies: 3Last Post: 03-21-2009, 10:05 AM -
combobox
By chandu.v in forum New To JavaReplies: 2Last Post: 07-02-2008, 08:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks