Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a UI Bean?

Status
Not open for further replies.

wangdong

Programmer
Oct 28, 2004
202
0
0
CN
I have a JFream and there is a JComboBox on this JFrame. Can I use JCheckbox as the JComboBox item and I want all the items to layout properly, something likes;

JList.setLayoutOrientation(JList.HORIZONTAL_WRAP);

Additionally, I need to add two buttons on the bottom of the list, which can allow user to click ok or cancel.

If I cannot use JComboBox, is there anyway to create my own UI bean? Any idea will be very helpful.

Thank you




Chinese Java Faq Forum
 
Well, a JComboBox is just a button an a drop-down list but ... why would you want to do a custom one having this?

Cheers,
Dian
 
The program needs to pass a 16bit or a 32bit value to the server, rather to ask user input this meaningless value, I would like to let user selecting on a bunch of check box. However the GUI has a limited area to put all the check boxes, that is why I need to do it by using an drop down check list box with two buttons (Ok and Cancel) on it.

Is it clear enough? Let me give you an example.

A flag field contains a 16bit value.

1101101000000100

Each bit is a service, like request, response, return etc. User can set enable or disable on these services. After they chose, the program will build a 16bit value according the user selections.


Chinese Java Faq Forum
 
How about using a dialog box with the check boxes in it?

Tim
---------------------------
"Your morbid fear of losing,
destroys the lives you're using." - Ozzy
 
Or a bunch of checkboxes in a ScrollPane with the buttons at the top and the bottom.

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top