• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

JComboBox drop down

 
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 158
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Thanks a lot for the replies, I will try it with the null layout. regards.
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just for the records (as I first found this post when searching for a similar problem): the workaround seems to be:



See JScrollPane hides JComboBox dropdown list
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic