aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes How to specify X and Y position of a ComboBox? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How to specify X and Y position of a ComboBox?" Watch "How to specify X and Y position of a ComboBox?" New topic
Author

How to specify X and Y position of a ComboBox?

john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495

How do you specify X and Y postions of a ComboBox? By using combobox.setBounds(x, y, l, h)?

Thanks,
cc11rocks aka John Price


“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: 2227
    
    8
You should learn to use Layout Managers.
john price
Ranch Hand

Joined: Feb 24, 2011
Posts: 495


This isn't working. And the way I have things set up, setBounds would work WAY better than Layout Managers. setBounds is not working.
Please help,
John Price aka cc11rocks
Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2227
    
    8
And the way I have things set up, setBounds would work WAY better than Layout Managers.


That was my point. You have things set up wrong. You need to design for layout managers from the beginning. So take the time to learn how to use them properly now so you don't get into bad habits.

Anyway we can't tell why your 4 lines of posted code don't work because we don't know how they are used in the context of you program.

And you still haven't changed the variable name.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19785
    
  20

Rob Camick wrote:Anyway we can't tell why your 4 lines of posted code don't work because we don't know how they are used in the context of you program.

Probably because there is a layout manager at work which re-positions and re-sizes the combo box.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to specify X and Y position of a ComboBox?