File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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
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: 2153
    
    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: 2153
    
    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!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: symbol : constructor JComboBox(java.lang.String[],int,int)...cannot find symbol
 
Similar Threads
Head First Java BeatBox, wont compile!
How to specify X and Y position of a ComboBox?
Java Object Oriented Grades Program
non-static method nextBoolean() cannot be referenced from a static context error
setLocation and setBounds are not working for JComboBox