首页 > 代码库 > 右下角弹出对话框

右下角弹出对话框

        dialog.pack();        dialog.setAlwaysOnTop(true);        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();        Insets screenInsets = Toolkit.getDefaultToolkit().getScreenInsets(                dialog.getGraphicsConfiguration());        int x = (int) (dim.getWidth() - dialog.getWidth() - 3);        int y = (int) (dim.getHeight() - dialog.getHeight() - screenInsets.bottom - 3);        dialog.setLocation(x, y);        dialog.setVisible(true);