Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JComboBox drop down

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
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
 
Anand Karia
Ranch Hand
Posts: 156
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Manuel Moons
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Thanks a lot for the replies, I will try it with the null layout. regards.
 
sairam sam
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...


Sai.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic