Solved

JComboBox in JMenu for font selection.

Posted on 2004-03-22
3
981 Views
Last Modified: 2013-12-03
I'm working on an application where the user may want to frequently change fonts.  I would LIKE to simply include a JComboBox dropdown in my JMenu.  Is there any way I can stick a JComboBox into the menubar?   Or will I be forced to use a popup or a seperate item elswhere in the frame.

Thanks,

Donald HInes
0
Comment
Question by:DonaldHines
  • 2
3 Comments
 
LVL 30

Accepted Solution

by:
GrandSchtroumpf earned 50 total points
ID: 10652663
I don't see the point of using a JComboBox in a JMenu.
You can simply use MenuItems to add a second-level menu.
Something like View/Font/ and there you put the different fonts you would have put in the JComboBox.
You can use radio buttons for the different fonts, so only one will be selectable and you'll have a nice little bullit in front of the one that is currently selected.
And you can use a JComboBox in a JToolbar.
0
 
LVL 1

Author Comment

by:DonaldHines
ID: 10654933
I wanted a JComboBox because it allows the user to simply type in a fontname if they wished instead of scrolling through a long list.  BUT I suppose most users are going to scroll anyway.   I'll either use a submenu or try out the JToolbar.  
Thank you for the help.
0
 
LVL 30

Expert Comment

by:GrandSchtroumpf
ID: 10655806
:°)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
groupNoAdj 7 87
eclipse java  build path 6 45
servlet requestdispatcher include and forward differences 1 25
servlet example issue 6 33
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

861 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

30 Experts available now in Live!

Get 1:1 Help Now