右下角弹出对话框

        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);

 

posted @ 2014-06-13 15:31  True.M  阅读(307)  评论(0编辑  收藏  举报