aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes symbol  : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "symbol  : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol" Watch "symbol  : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol" New topic
Author

symbol : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

At top of code:

Later:

Error:

Why I used this:

, int, int)]JavaDocs

How to fix the problem and what did I do wrong?

Thanks,
cc11rocks


“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” (Mosher's Law of Software Engineering)
“If debugging is the process of removing bugs, then programming must be the process of putting them in.” (Edsger Dijkstra)
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2090
    
    7
symbol : constructor JComboBox(java.lang.String[],int,int)


Have you read the JComboBox API? Is there a constructor with that signature.



User proper variable names. Variable names don't start with an upper case character.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495


ComboBox

public ComboBox(String[] items,
int x,
int y)
Constructs a new ComboBox with a list of items at the given x- and y-coordinates. The preferred width and height is internally computed by taking the contained items dimensions.
Parameters:
items - An array of text-items.
x - The x-coordinate of this ComboBox.
y - The y-coordinate of this ComboBox.

Taken directly from the site posted in my previous post. JavaDocs API.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

That's not a JComboBox


luck, db
There are no new questions, but there may be new answers.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

Thanks everyone. I just had to add a Layout (I chose null). Thank you guys for your help!

How I did it:

Thanks everyone!
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2090
    
    7
I just had to add a Layout (I chose null).


"null" is NOT a layout. Learn the proper way to create a GUI by using Layout Managers.

You ask for advice on how to improve your program and then you ignore the advice!
 
Don't get me started about those stupid light bulbs.
 
subject: symbol : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol
 
Similar Threads
How to specify X and Y position of a ComboBox?
setLocation and setBounds are not working for JComboBox
non-static method nextBoolean() cannot be referenced from a static context error
Head First Java BeatBox, wont compile!
Java Object Oriented Grades Program