The only way I know how to do it is to use an undecorated frame with the Metal LAF:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class SSCCE5
{
private static void createAndShowGUI()
{
JFrame frame = new JFrame("SSCCE5");
frame.setUndecorated(true);
frame.getRootPane().setWindowDecorationStyle(JRootPane.FRAME);
frame.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocationByPlatform( true );
frame.setSize(200, 200);
frame.setVisible( true );
}
public static void main(String[] args)
{
EventQueue.invokeLater(new Runnable()
{
public void run()
{
createAndShowGUI();
}
});
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.