About 161,000 results
Open links in new tab
  1. swing - Java nested layouts - Stack Overflow

    Apr 4, 2017 · If you will always have two short and one long texts on the right side, use BorderLayout for the panel on the right. Add the big text as BorderLayout.CENTER, and make one more panel (can be GridLayout) for the two shorter texts on the top.

  2. How to Use BorderLayout (The Java™ Tutorials - Oracle

    Defines a border layout with specified gaps between components. Sets the horizontal gap between components. Sets the vertical gap between components. The following table lists code examples that use the BorderLayout class and provides links to related sections. Puts a component in each of the five possible locations.

  3. java - Drawing to a nested panel using BorderLayout - Stack Overflow

    Apr 24, 2013 · I am playing around with Java layouts, specfically Nested Panels using BorderLayout. The Problem that I have is that i am unable to draw to the nested panels. I am able to draw to the main panel but not the panels nested within it.

  4. java - Working with nested Panels - Stack Overflow

    May 10, 2013 · This example uses GridBagLayout and weighty to adjust the space allocated to the top (2D/3D) views and the bottom views, but you should also take a look at overriding the getPreferredSize of the final components, to provide better hints to the layout managers.

  5. Java AWT | BorderLayout Class - GeeksforGeeks

    Oct 6, 2021 · BorderLayout (int, int): It will constructs a border layout with the specified gaps between the components. Commonly Used Methods: toString (): Returns a string which is the representation of the state of border layout. getLayoutAlignmentX (Container parent): Returns the layout alignment along the X-axis.

  6. BorderLayout (Java Platform SE 8 ) - Oracle

    Constructs a border layout with the specified gaps between components. The horizontal gap is specified by hgap and the vertical gap is specified by vgap . Parameters:

  7. Java's BorderLayout: A Comprehensive Guide for Developers

    In this post, you'll learn how to use BorderLayout effectively to enhance your Java projects. We'll dive into practical examples, with clear explanations of each line of code, making it straightforward to implement in your next project. Let's simplify GUI design together. Understanding BorderLayout

  8. Java Swing BorderLayout Example - Java Guides

    In this tutorial, we will learn how to use BorderLayout in GUI/swing based applications. BorderLayout is a simple layout manager that can be handy in certain layouts. It is a default layout manager for JFrame, JWindow, JDialog, JInternalFrame, and JApplet.

  9. Simple Border Layout in java - GitHub

    Experimenting with nested layouts and panel customization. This Java program demonstrates a simple GUI layout using JFrame, JPanel, and BorderLayout from the Swing library. The main window is divided into five primary panels, each with distinct colors and sizes.

  10. java - How to arrange components using BorderLayout? - Stack Overflow

    Mar 21, 2018 · BorderLayout expects you to put all of your components into a JPanel, then add them to areas of the BorderLayout like WEST and NORTH. BorderLayout does not work well with using individual components that aren't nested inside panels.

Refresh