Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

JFrame change outline

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 :: create a border java 
Java :: how to code java??????????? 
Java :: how to recognize a pressed key in java 
Java :: java regex for ip address 
Java :: how to print all package in java 
Java :: java list newline 
Java :: java run jnlp 
Java :: how to convert a arraylist to array in java 
Java :: next method jdbc 
Java :: byte array in java 
Java :: Retrieve User information in Spring Security 
Java :: android send fragment context 
Java :: prime factorization java 
Java :: how to sort the arraylist without changing the original arraylist 
Java :: how to upload image from android app to server 
Java :: string compareto vs equals java 
Java :: Valid regex check java 
Java :: radiogroup get selected item android 
Java :: qr code spring boot 
Java :: java static keyword 
Java :: java delete element from list 
Java :: json java 
Java :: capture console output java 
Java :: constructor of class that extends another class 
Java :: Passing data from an activity to a fragment 
Java :: display hello world in android app 
Java :: using super in java 
Java :: calling static method in java 
Java :: inorder traversal 
Java :: android videoview not smooth for mp4 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =