- JMenu in the JDK7 Javadoc
Questions tagged [jmenu]
361 questions
-1
votes
1 answer
Replicate JMenu in paintComponent of child
Where would I find the code or how would I create the code to replicate a JMenu in the paintComponent Method using a custom class that extends JMenu?
I have looked through the jdk and cannot find the code for drawing a JMenu in its own class or any…

Daedric
- 502
- 4
- 23
-1
votes
1 answer
Choice appears over JMenu
I'm creating a program interface where the users selects something into a menu and then it will display several tabs. Inside some tabs there are choices. The problem comes when the user select something from the menu, the tab becomes visible, and…

Felipe Hogrefe Bento
- 187
- 15
-1
votes
1 answer
Java Swing JMenu's icon shifts to right
I add an icon to my JMenu which is in an applet. When I run the applet the icon appear allright. But when access it through a browser, as this applet loads in a portlet in a web application, the icon shifts to right in the JMenu.
I do the following…

Shariq
- 25
- 2
- 8
-1
votes
1 answer
"AWT-EventQueue-0" java.lang.IllegalArgumentException: wrong parent for CardLayout
first of all, I apologize for my English, much of this text I have made with the translator of google.
As for the problem, try using CardLayout by JMenu and attempting to show the different views, I jump the error.
I was googling and looking at the…

Riffero
- 3
- 5
-1
votes
2 answers
JMenu not active inside JPanel
I need to create a comboBox with multiple chechboxes in my java swing gui. My first thought was to create a custom comboBox with its own CellRenderer but then I decided to go with a more "friendly" solution and use JMenu with JCheckBox items…

Smajl
- 7,555
- 29
- 108
- 179
-1
votes
2 answers
JFileChooser does not appear when JMenu is selected
I'm new in Java so I really need help. I want my JMenu open to open file using file chooser only when I clicked it but what happening is that it does not appear.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import…
-1
votes
1 answer
Problems using JMenu with different choices
I´ve been working on a GUI and I´ve run into some problems with a JMenu. The GUI is in a separate class that takes all the actions of the program from the rest of the classes. My problem with using the menu is that I want it to do 2 things: first,…

Slim
- 5
- 2
-1
votes
1 answer
Java add ActionListener to JMenu with looped items
I have got a JMenu, to which I add items using a for loop. The items are displayed correctly, however, I've got no idea how to add any kind of Listener to the objects created. I don't need a listener on every single item added to JMenu, I just need…

Oliver Bak
- 151
- 12
-1
votes
3 answers
JMenu and JMenuItem
So, I have the following code:
JMenu debug = new JMenu("Debug");
debug.add(new Debug());
And then the Debug class is:
public class Debug extends JMenuItem {
public final String TEST_DEBUG = "Test";
public Debug() {
…

user2527967
- 7
- 5
-1
votes
1 answer
Jmenu jquery plugin will not work if i replave the with @Html.ActionLink
I have the following JMenu inside my asp.net mvc3 web application:-
- Home
-
…
user1404577
-2
votes
1 answer
how do I use layouts in java without elements overlapping?
I want to have my menubar and help bar appear next to each other but if they both share the same position they overlap, how do i get them to sit next to each other?
add(menuBar, BorderLayout.PAGE_START);
add(helpBar,…
-2
votes
1 answer
Java, How Do I setText of JMenuItem from another class?
Unfortunately I did not learn Java, I know other programming languages with the exception of Java.
I know how to create a Menu and add items to the menu. I figured that out from my simple basic java books. However I have access to a piece of open…

Shawn Mulligan
- 37
- 5
-2
votes
1 answer
How to open a new JFrame through a JMenu Item?
Right, so I already looked at multiple questions regarding something close to this but not what I need help with.
What my issue is, what would I call so that when "New" is clicked, a new Frame would open (the same but just opened again).
The system…

Carbs
- 9
- 1
-2
votes
1 answer
how to use the a JMenu to same whats on the textpane?
I'm trying to save what is on my textpane by using FileWriter and PrintWriter.
// Save file
fileItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
System.out.println("Pressed menu…

user2145688
- 11
- 1
- 1
- 7
-3
votes
1 answer
JAVA - JMenu built from file
I would like to build a JMenu using the content of a text file with this layout / appearance (# for separator ; JMenu X and JMenuItem X will be replaced by String sequences) :
JMenu 1 # JMenuItem 1
JMenu 1 # JMenuItem 2
JMenu 1 # JMenuItem 3
JMenu 2…

Fred
- 169
- 1
- 3
- 19