File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes JComboBox drop down Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JComboBox drop down" Watch "JComboBox drop down" New topic

JComboBox drop down

Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
In my program, I have set the layout to GridBagLayout and the problem is the JComboBox drop down part is not visible. When I press a letter, the correct name is shown in the combobox as well. So there are data. So could you please let me know what I can do to make this visible. (When I change the layout into Flowlayout, the drop down is visible)

Thanks and regards

SCJP 1.4, SCMAD 1.0<br />SCWCD, SCBCD (in progress)
Anand Karia
Ranch Hand

Joined: Sep 25, 2004
Posts: 156

Dear Ransika

There are certain limitation and rules using GridBagLayout and as well as other layouts. I normally use null layout instead of using GridBagLayout or others. Presently I am using NetBeans IDE. In which i am using null layout that allow me to place every component according to my needs. I, therefore, suggest you to use null layout so that u can place every component according to your need.

Further all component and thier data will also be visible without any problems.

I think this could solve your problem.

Love is GOD and GOD is Love.
Anand Karia
IT Concretor.......
M/s. Anand Karia Concreting IT
Manuel Moons
Ranch Hand

Joined: Mar 05, 2002
Posts: 229
I think the previous suggestion is the easy way out of course. I think something is wrong in your code. Can you strip it down to a simple application and show us your code!

GridBagLayout is very powerful when used correctly!
Ransika deSilva
Ranch Hand

Joined: Feb 18, 2003
Posts: 524
Hi Thanks a lot for the replies, I will try it with the null layout. regards.
sairam sam

Joined: Apr 15, 2005
Posts: 10
There should not be problem with the gridbaglayout....except its difficult to edit the screen layout...apart from that i dont see any issues...
can you please post your code...

if you have solved the issue pls, update...

note: I used the IRAD tool...

I agree. Here's the link:
subject: JComboBox drop down
jQuery in Action, 3rd edition