Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

java swing border

import java.awt.*;
import javax.swing.*;

public class BorderFrameExample extends JFrame 
{
   JLabel l = new JLabel("Welcome!", JLabel.CENTER);
   
   public BorderFrameExample() {
      //add label to frame
      add(l, BorderLayout.CENTER);
      //remove the decoration
      setUndecorated(true);
      //set border
      getRootPane().setBorder(
         BorderFactory.createMatteBorder(4, 4, 4, 4, Color.BLUE)
      );
      setSize(250,250);
      setVisible(true);
      setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   }
   public static void main(String[] args) {
      new BorderFrameExample();
   }
}
Comment

PREVIOUS NEXT
Code Example
Java :: how to code java??????????? 
Java :: java sub method 
Java :: Implement the static keyword – static variable, static block, static function and static class with following conditions 
Java :: Send keybord key P in selenium java 
Java :: Java No-Arg Constructors 
Java :: how to sort arraylist in java 
Java :: android get app build name 
Java :: how to create dynamic string array in java 
Java :: csv compare 
Java :: initialize an arraylist in java in java 
Java :: spring boot embedded tomcat port already in use 
Java :: java program to search item from name in class 
Java :: Java reduce() Method 
Java :: GetMapping("/rest/v1/books") in spring rest api 
Java :: how to get string value in java in android 
Java :: initialize empty dictionary java 
Java :: java string loop backwards 
Java :: Card view only top corner radius 
Java :: long java 
Java :: check if short int or long java 
Java :: android studio checkbox result 
Java :: java insertion sort 
Java :: Java List Access Elements using get() method 
Java :: java compile 
Java :: how to set the length to int array in java 
Java :: encryption 
Java :: Java Create a PrintWriter 
Java :: advantages of using java 
Java :: instantiation in java 
Java :: how to et curent directory in java 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =