0
我有一个的JWindow在我的应用程序,它在右上角弹出。我已经将形状设置为RoundRectangle2D,但JWindow的边界没有反锯齿,因此看起来很可怕。所以我的问题是,我如何反别名JWindow?我知道如何用Graphics来反锯齿形状,但这对JWindow本身无效,是吗?无论如何,我怎样才能反我的JWindow的边界?抗锯齿的JWindow(形状)
代码:
公共类选择实现接口{
//Variables
//Windows
static JWindow Frame = new JWindow();
static JWindow[] Label = new JWindow[100];
static Shape Shape;
static JWindow ExitWindow = new JWindow();
static JWindow MenuWindowHide = new JWindow();
public static void initialize() {
//Settings
Frame.setBounds(0,0,(int)Utility.getScreenRes().getWidth(),(int)Utility.getScreenRes().getHeight());
Frame.setOpacity(0.4f);
ExitWindow.setBounds((int) (Utility.getScreenRes().getWidth() - 40), 25,20,20);
ExitWindow.getContentPane().setBackground(Color.DARK_GRAY);
ExitWindow.setShape(new RoundRectangle2D.Double(0,0,20,20, 6, 6));
//Post settings
Frame.setVisible(true);
ExitWindow.setVisible(true);
}
}