About 10,900,000 results
Open links in new tab
  1. Java AWT MenuItem & Menu - GeeksforGeeks

    Nov 13, 2023 · The Java AWT Menu class represents a pop-up menu component in a graphical user interface (GUI) that can contain a collection of MenuItem objects. It provides a way to create and manage menus in Java AWT applications.

  2. How to Use Menus (The Java™ Tutorials > Creating a GUI With …

    The rest of this section teaches you about the menu components and tells you how to use various menu features: The menu component hierarchy; Creating menus; Handling events from menu items; Enabling keyboard operation; Bringing up a popup menu; Customizing menu layout; The Menu API; Examples that use menus; The Menu Component Hierarchy

  3. user interface - Simple Dropdown menu in Java - Stack Overflow

    You should use either BoxLayout, GridBagLayout or GroupLayout to display your components under each other. with GridBagLayout you can put components in a grid of cells. while in GroupLayout you can work on a vertical layout.

  4. Introduction to Java Swing - GeeksforGeeks

    Jul 30, 2024 · Java Swing offers much-improved functionality over AWT, new components, expanded components features, and excellent event handling with drag-and-drop support. Swing has about four times the number of User Interface [UI] components as AWT and is part of the standard Java distribution.

  5. user interface - Creating a menu in java - Stack Overflow

    Jul 25, 2014 · Is there a way to create a menu in Java GUI? Like for example, I'm using Firefox right now. On the top of the browser, there's a menu with the tabs "File," "Edit," "View," "History," "Bookmarks," "Tools," and "Help."

  6. Menu Driven Program in Java With Explanation - The Knowledge …

    Feb 6, 2025 · Users can make their choices by selecting options from the menu, which then trigger specific actions or functionalities within the program. The menu is typically displayed on the screen, providing a user-friendly interface for interaction.

  7. Creating a console menu for user to make a selection

    Nov 9, 2011 · Doing a program in Eclipse with Java. What I want to do is when I execute the program I want present the user with a choice. I have all the calculations etc. done, I'm just unsure as to how to make this menu to offer the user choices. Example of what I'm looking for: Data data = new Data(); . data.menu(); }

  8. How to Use Menus - Princeton University

    To be able to contain a MenuComponent, an object must adhere to the MenuContainer interface. The Frame, Menu, and MenuBar classes are the only AWT classes that currently implement MenuContainer. Here's the code for the window that the above applet brings up.

  9. How to Build a Java GUI Application: A Step-by-Step Guide

    Dec 17, 2024 · Learn how to build Java GUI applications using JavaFX in this step-by-step guide. From setting up your environment to designing a modern interface, this article covers it all.

  10. About Menus | Java Menus #1: Java Swing and Menus - InformIT

    Essentially, all menus in Java are represented by two classes: Jmenu and JmenuItem. A JMenuItem represents an actual selectable menu item. For example, the “New” and “Open” items in Figure 1 are JMenuItem objects. A JMenu is a container for JMenuItems that, when selected, pops up a window displaying the JMenuItems .