Solved

JComboBox in JMenu for font selection.

Posted on 2004-03-22
3
1,009 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

724 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