About 1,230,000 results
Open links in new tab
  1. java - How to make a border fit around a JLabel - Stack Overflow

    Oct 1, 2016 · If you want to achieve the effect from the screen you should set the vertical alignment to NORTH and use CompoundBorder consisting of white outer border and inner …

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

    To put a border around a JComponent, you use its setBorder method. You can use the BorderFactory class to create most of the borders that Swing provides. If you need a reference …

  3. Create JLabel with border - Java Code Geeks

    Nov 11, 2012 · Use BorderFactory.createLineBorder(Color.BLUE, 5) to create a new Border with specific color and line width. Use JLabel.setBorder to set the border of the JLabel component. …

  4. Add Border to Label in Swing - Online Tutorials Library

    Following example showcase how to add border to a JLabel in a Java Swing application. We are using the following APIs. BorderFactory.createLineBorder() − To create a line border. …

  5. Java Swing | BevelBorder and SoftBevelBorder - GeeksforGeeks

    Apr 16, 2021 · To set the bevel border, we create 2 JLabel objects, "l" and "l1", one for the raised type border and the other for lowered type border. The borders are applied by the function …

  6. java - Border with rounded corners & transparency - Stack Overflow

    I found a way to restrict the BG color of a label to 'inside the border' by setting a Clip (representing the area outside the rounded corners) on the Graphics2D instance and calling clearRect(). …

  7. 5.7. Borders - JavaPerspective.com

    Jan 25, 2013 · Borders are generally used to enhance the appearance of components' edges and, to a lower extent, to put empty space between the edges of different components. This tutorial …

  8. Java Source Code: Create Different Borders of a Label

    Sep 9, 2008 · In this java code, a method make(Border border, String command) is defined to create a new JLabel with the specified Border object and text label. This method is called …

  9. Borders - Learning Java, 4th Edition [Book] - O'Reilly Media

    Creating and setting a component’s border, then, is simple: Every component has a setBorder() method, from simple labels and buttons right up to the fancy text and table components that …

  10. How to Use Borders (The Java™ Tutorials > Creating a GUI

    To put a border around a JComponent, you use its setBorder method. You can use the BorderFactory class to create most of the borders that Swing provides. If you need a reference …

  11. Some results have been removed
Refresh