Questions tagged [jmenubar]

Java swing implementation of a menu bar. JMenu objects are added to the menu bar to construct a menu.

263 questions
-1
votes
1 answer

How to add a JDialog box into a menu bar?

I was wondering whether someone would possibly be able to help me with a problem that I am having? So I am creating a game of checkers and I wish to add a menu bar to the top of my window, the code of which can be seen below, however within one of…
Hawk97
  • 19
  • 8
-1
votes
1 answer

How to use a created JMenuBar in each of the java swing form?

I have created a JMenuBar and I want to use that JMenuBar in every form of my swing application. Writing JMenuBar in every form is not an efficient programming. So, I want to use the same JMenuBar in every form. But I have no clue how to do it.…
Indranil Banerjee
  • 133
  • 1
  • 1
  • 11
-1
votes
2 answers

JScrollPane doesn't work when I add menuBar

I asked a question similar to this one some months ago: here the problem was solved but as soon as I add my menuBar to this code the scrollPane disappeared again. this is my new code : public class Question { int count = 0; ArrayList[]…
Paniz
  • 594
  • 6
  • 19
-1
votes
1 answer

JMenu work on single tab

I have a JMenuBar and I have a JTabbedPane, when I create multiple tabs the JMenuBar does it on all the tabs, e.g. I open a file it opens the same file in each tab. However I only want it to open a file on the current tab. I have added a…
user1938460
  • 75
  • 1
  • 1
  • 9
-2
votes
1 answer

Why does my JMenuBar not appear?

I am writing this program that creates an H-Tree design wherever you click, and I am supposed to implement a JMenuBar so I can change the color of the recursive drawing. For some reason it is not showing up no matter what I do. import…
PhilD359
  • 1
  • 2
-2
votes
2 answers

Creating a simple text editor in Java

How to create a text editor like Notepad ? with functions like "New file", "Open file", "Save file", "formatting text" using Java's GUI elements.
Andy the android
  • 169
  • 1
  • 2
  • 16
-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

How to get the currently selected Menu or MenuItem

How can I retrieve the currently selected menu or menu item when clicked on it and the subsequent path will be printed on console. In this code I have done the menus and sub menus up to 4 levels. And want to print the path of selected menus and…
Rabi Narayan
  • 23
  • 1
  • 3
1 2 3
17
18