Solved

JComboBox in JMenu for font selection.

Posted on 2004-03-22
3
973 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
Comment Utility
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
Comment Utility
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
Comment Utility
:°)
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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.

762 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

6 Experts available now in Live!

Get 1:1 Help Now