Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
jmenu
- Page 1
JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Petranilla
Hi everyone, I'm dealing with both
JMenu
and JPopupMenu in a program. Looks good except when I switch from
JMenu
to JPopupMenu by right click, it doesnt work. How? Many thanks.
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Petranilla
Lucaci: Yes, JPopupMenu(by right click) from
JMenu
but it doen't change the background. It's actually a program to change background.Many thanks. mKorbel: I'll check,the menus are display on both
JMenu
and JPopupMenu but it's not displaying the background.Many thanks.
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Lucaci Andrew
> JPopupMenu(by right click) from
JMenu
but it doen't change the background. It's actually a program to change background. This, I don't get this. What do you mean by > it doen't change the background ? Isn't the JPopomenu showing when you right click an item from your
JMenu
?
Re: JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by Meldroz
I think you want something with swings since you mentioned
JMenu
. here's a simple example:
JMenu
menu = new
JMenu
("Color"); JMenuItem blueM = new JMenuItem("blue"); // and do this for the others and once done add them to your menu //ex: menu.add(blueM); // and so on hope this helps good luck, Mel
Re: JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by server_crash
Thank you all for the help. I guess I was unclear on what I wanted. I figured out how to do this though. What you do, is simply add a
JMenu
, to a
JMenu
, and that makes it to were you can have subcategories.
Re: JMenu Items and listeners
Programming
Software Development
13 Years Ago
by StaticX
It was a null to pointer error. I have overcome the error through creating local actionPerformed event handlers instead of the method shown above and it now works.I think it may have been a problem with a
JMenu
Item having the same functionality as a button in the JFrame.
Need help with JMenu
Programming
Software Development
9 Years Ago
by NightOwl19
…(); JPanel ButtonPanel = new JPanel();
JMenu
File = new
JMenu
("File");
JMenu
Edit = new
JMenu
("Edit");
JMenu
Help = new
JMenu
("Help"); JMenuItem…
Re: JRadioButtons not working in JMenu
Programming
Software Development
19 Years Ago
by server_crash
… br = new BorderLayout(); JMenuBar menuBar = new JMenuBar();
JMenu
fileMenu = new
JMenu
("File"); fileMenu.add(exit = new JMenuItem("… = new JMenuItem("Clear")); clear.addActionListener(this);
JMenu
formatMenu = new
JMenu
("Format"); ButtonGroup bg = new ButtonGroup(); rb0 …
netbeans jmenu popup only sometimes works
Programming
Software Development
9 Years Ago
by COKEDUDE
I am having issue with
jmenu
popup in netbeans. It only sometimes works. Sometimes I don'…(null); JMenuBar mb = new JMenuBar();
JMenu
file = new
JMenu
("File"); mb.add(file);
JMenu
edit = new
JMenu
("Edit"); mb.add…
How to add MouseListener to JMenu
Programming
Software Development
13 Years Ago
by LianaN
… allows running "createBaseRight" after selecting (NOT CLICKING)
JMenu
: home. Thanks in advance! [CODE] JMenuBar menubar = new… JMenuBar(); this.setJMenuBar(menubar);
JMenu
home = new
JMenu
("Начальная страница"); menubar.add(home); //... menubar.…
JRadioButtons not working in JMenu
Programming
Software Development
19 Years Ago
by server_crash
I have a
JMenu
with some radio buttons...For some reason, when I click … the snippets of code with them in it: [Code]
JMenu
formatMenu = new
JMenu
("Format"); ButtonGroup bg = new ButtonGroup(); rb0 = new…
Re: How to add MouseListener to JMenu
Programming
Software Development
13 Years Ago
by NormR1
[QUOTE]MouseListener to
JMenu
[/QUOTE] What kind of MouseEvents are you interested in?
Text File and JMenu
Programming
Software Development
14 Years Ago
by KimJack
… and write each item in a seperate
JMenu
for user selection. For example each
JMenu
will house one column of information. So…
Re: Text File and JMenu
Programming
Software Development
14 Years Ago
by KirkPatrick
…(itemC); //do what you want here //maybe add them to
jMenu
here //catch exceptions [/code] I hope that helps a little…
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Lucaci Andrew
Need more info and the code that you think has to do that... See if you assigned to your menu item the jpopmenu object.
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by mKorbel
I think that proper way is described in previous post
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Banderson
Do you mean background color? If so use this, tweek as needed: myContentPanel.getContentPane().setBackground(Color.YourColorVariable_here); myContentPanel.getContentPane().validate(); myContentPanel.getContentPane().repaint();
Re: JMenu and JPopupMenu
Programming
Software Development
10 Years Ago
by Petranilla
Many thanks, initiatialization of image icon made it work.
Re: Gaps between JMenu Item's
Programming
Software Development
12 Years Ago
by mKorbel
1)
JMenu
.addSeparator this JSeparator has Color, you can change this Color for translucent effect 2) JMenuItem.setBorder(new EmptyBorder(10,10,10,10));
JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by server_crash
I can't seem to remember how you create subitems in the menu's. Does anyone know how? Like this: Format --> Color(then like a drop down) *red *blue *green
Re: JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by OurNation
Heres an example of a couple different ones [CODE] /* * ChoiceTest * Demonstrates the Choice Component */ import java.awt.*; public class ChoiceTest { public ChoiceTest() { //Make the Choices Choice c1 = new Choice(); c1.add("Soup"); c1.add("Salad"); Choice c2 = new Choice(); c2…
Re: JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by server_crash
Yes, I know how to create the Menu's and the Menu items, but how do you have menu items with subcategories...Look at this screenshot to see what I'm saying.
Re: JMenu ...Can't remember
Programming
Software Development
19 Years Ago
by Meldroz
Ho, Well it depends you can create one of these and add them to your drop down menu object: JRadioButtonMenuItem JCheckBoxMenuItem I'm sure there are others but these are the only two that i ever used. create these and add them to your MenuItem objects. I don't know if that's what you wanted to hear, but that's all i got.:cry: Mel
JMenu Items and listeners
Programming
Software Development
13 Years Ago
by StaticX
Hello, I am having some trouble with getting my menu to respond to a mouse click.I have 2 items on my menu, "New" and "Exit", and they are using the actionlistner like so [CODE] newFromMenu = new JMenuItem("New Screen"); newFromMenu.addActionListener(this); [/CODE] and then my action event [CODE]…
Re: JMenu Items and listeners
Programming
Software Development
13 Years Ago
by JamesCherrill
What exactly is the error you are presented with?
Re: Need help with JMenu
Programming
Software Development
9 Years Ago
by JamesCherrill
The normal way to create a menubar as part of the frame and without confusing the content pane's layout, is main.setJMenuBar(menu); see http://docs.oracle.com/javase/tutorial/uiswing/components/toplevel.html
Re: Need help with JMenu
Programming
Software Development
9 Years Ago
by NightOwl19
okk, made the changes as u suggested and it's working now..Thanks!!!
Re: netbeans jmenu popup only sometimes works
Programming
Software Development
9 Years Ago
by Slavi
I don't see anything wrong with the code, tried running it using terminal as well, works fine. Could be something with Netbins itself
Re: netbeans jmenu popup only sometimes works
Programming
Software Development
9 Years Ago
by COKEDUDE
Netbeans is picky about the order. When I moved this to the bottom of main it works as expected :). f.setVisible(true);
Re: netbeans jmenu popup only sometimes works
Programming
Software Development
9 Years Ago
by Slavi
Glad it works then ;)
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Forums
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC