• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rob Camick
Ranch Hand
Posts: 2476
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 495
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 5116
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not a JComboBox
 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2476
8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic