Maximize کردن Jframe و از بین بردن border

Maximize کردن jframe و از بین بردن border فریم
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class FullScreenJFrame extends JFrame {

public FullScreenJFrame(String title) {


Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
setBounds(0, 0, screenSize.width, screenSize.height);
getContentPane().add(new JLabel(“A JFrame Based Kiosk”), BorderLayout.NORTH);
JButton closeButton = new JButton(“Close”);
closeButton.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent ae) {
System.out.println(“Close button Pressed”);
getContentPane().add(closeButton, BorderLayout.CENTER);

public static void main(String[] args) {
FullScreenJFrame frame = new FullScreenJFrame(“”);

به نقل از : saeedIRHA

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.