Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

create a border java

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 create search function in android studio 
Java :: java sub function 
Java :: math square java 
Java :: contient java 
Java :: enable cors on apache tomcat 
Java :: java list tostring 
Java :: how to use setonclicklistener from custom view in android 
Java :: java basic program 
Java :: Compare two csv files using java 
Java :: java string 
Java :: java clear scanner2 
Java :: get sum of array and return string 
Java :: t implements comparable 
Java :: isWhiteSpace java 
Java :: java null 
Java :: hibernate onetone with mapsid 
Java :: firebase realtime database get key 
Java :: java 2d jagged array example 
Java :: how to find a word in a statement java 
Java :: flutter doctor Unable to find bundled Java version. 
Java :: hashtable in java 
Java :: final variable java 
Java :: how to start array index from 1 in java 
Java :: int arr = new int 
Java :: switch in java 
Java :: swagger ui java 
Java :: Java Iterating through LinkedList 
Java :: java replaceall single character 
Java :: my canvas java 
Java :: naming convention in selenium 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =