• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

JComboBox doubt  RSS feed

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a small doubt in JComboBox. I want to add combo box to JPanel, here i am using BoxLayout to add combobox to the panel. here my doubt is that when i am maximise the frame, the combobox size automatically increasing in the panel , it occupies the entire panel, i don't how it is happening, it is the functionality of the JcomboBox ? please suggest me.

Thank You in Advance..
 
Rancher
Posts: 2958
20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you can use:

 
tadi raja
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob Camick,
you mentioned the comboBox.setMaximumSize(refComboBox.getPreferredSize()); method is not working ....
 
Rob Camick
Rancher
Posts: 2958
20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you need further help then you need to create a SSCCE (Short, Self Contained, Compilable and Executable, Example Program), that demonstrates the incorrect behaviour.

Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.
 
tadi raja
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

please find the attached screen shot when maximise the frame

thank you in advance ..
combobox.JPG
[Thumbnail for combobox.JPG]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt also.

can you read english?

in your numerous posts, you have been repeatedly asked to post a compilable program,
so we can see 'exactly' what you are doing, and can test possible solutions.

just posting snippets creates a '20 guesses' scenario, which most won't play.

so, if you really want a solution, read the link (provided 20 or so times in the past),
and post a small program that we can copy/paste/compile/run and see the problem for ourselves

(my crystal ball says it's gunna be 2000 lines)
 
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Michael Dunn,
Please check your private messages.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!