本文整理汇总了Java中javax.swing.JFrame.getGlassPane方法的典型用法代码示例。如果您正苦于以下问题:Java JFrame.getGlassPane方法的具体用法?Java JFrame.getGlassPane怎么用?Java JFrame.getGlassPane使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JFrame
的用法示例。
在下文中一共展示了JFrame.getGlassPane方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: start
import javax.swing.JFrame; //导入方法依赖的package包/类
private void start() {
Toolkit.getDefaultToolkit().addAWTEventListener( this, KeyEvent.KEY_EVENT_MASK );
TopComponent.getRegistry().addPropertyChangeListener( this );
Window w = SwingUtilities.getWindowAncestor( resizingComponent );
if( w instanceof JFrame ) {
frame = ( JFrame ) w;
oldGlass = frame.getGlassPane();
glass = new GlassPane( resizingComponent );
frame.setGlassPane( glass );
glass.setVisible( true );
glass.invalidate();
glass.revalidate();
glass.repaint();
glass.refresh();
}
}
示例2: install
import javax.swing.JFrame; //导入方法依赖的package包/类
public void install() {
JFrame frame = (JFrame) WindowManagerImpl.getInstance().getMainWindow();
oldGlass = frame.getGlassPane();
if( oldGlass instanceof PleaseWait )
oldGlass = null;
frame.setGlassPane( this );
setVisible(true);
invalidate();
revalidate();
repaint();
}
示例3: run
import javax.swing.JFrame; //导入方法依赖的package包/类
@Override
public void run() {
try {
JFrame f = (JFrame)WindowManager.getDefault ().getMainWindow ();
Component c = f.getGlassPane ();
c.setVisible ( show );
c.setCursor (show ? Cursor.getPredefinedCursor (Cursor.WAIT_CURSOR) : null);
}
catch (NullPointerException npe) {
Exceptions.printStackTrace(npe);
}
}
示例4: run
import javax.swing.JFrame; //导入方法依赖的package包/类
public void run() {
try {
JFrame f = (JFrame) WindowManager.getDefault().getMainWindow();
Component c = f.getGlassPane();
c.setVisible(show);
c.setCursor(show ? Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR) : null);
} catch (NullPointerException npe) {
Exceptions.printStackTrace(npe);
}
}