本文整理了Java中javax.swing.JFrame.setOpacity()
方法的一些代码示例,展示了JFrame.setOpacity()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setOpacity()
方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setOpacity
暂无
代码示例来源:origin: stackoverflow.com
JFrame testFrame=new JFrame ();
testFrame.setUndecorated(true); // Frame is required to set undecorated for changing shape and transparency
testFrame.setOpacity(0.3f);
代码示例来源:origin: stackoverflow.com
window.dispose();
window.setUndecorated(true);
window.setOpacity(0.5f);
setOpaque(false);
} else {
window.dispose();
window.setOpacity(1f);
window.setUndecorated(false);
setOpaque(true);
代码示例来源:origin: com.eas.platypus/platypus-js-forms
@ScriptFunction
public void setOpacity(float aValue) {
opacity = aValue;
if (surface instanceof JDialog) {
((JDialog) surface).setOpacity(opacity);
}
if (surface instanceof JInternalFrame) {
((JInternalFrame) surface).setOpaque(opacity > 0.5f);
}
if (surface instanceof JFrame) {
((JFrame) surface).setOpacity(opacity);
}
}
代码示例来源:origin: stackoverflow.com
Go_Shadow.getModel().addChangeListener(new ChangeListener() {
@Override
public void stateChanged(ChangeEvent e) {
ButtonModel model = (ButtonModel) e.getSource();
JFrame window = (JFrame) SwingUtilities.getWindowAncestor(TextFrame.this);
if (model.isArmed() && model.isPressed()) {
window.setUndecorated(true);
window.setOpacity(0.5f);
setOpaque(false);
} else if (model.isArmed() && !model.isPressed()) {
setOpaque(true);
window.setOpacity(1f);
window.setUndecorated(false);
}
}
});
代码示例来源:origin: com.metsci.glimpse/glimpse-docking
frame.setOpacity( 0.5f );
content.setBackground( null );
break;
代码示例来源:origin: com.eas.platypus/platypus-js-forms
frame.setUndecorated(undecorated);
if (frame.isUndecorated()) {
frame.setOpacity(opacity);
内容来源于网络,如有侵权,请联系作者删除!