本文整理汇总了Java中javax.swing.JDialog.setIconImage方法的典型用法代码示例。如果您正苦于以下问题:Java JDialog.setIconImage方法的具体用法?Java JDialog.setIconImage怎么用?Java JDialog.setIconImage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JDialog
的用法示例。
在下文中一共展示了JDialog.setIconImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProgressMonitorContainer
import javax.swing.JDialog; //导入方法依赖的package包/类
/**
* Returns the progress monitor container that is either a JDialog or a JInternFrame.
* @return the progress monitor container
*/
private Container getProgressMonitorContainer() {
if (progressMonitorContainer==null) {
Dimension defaultSize = new Dimension(570, 188);
if (this.parentDesktopPane==null) {
JDialog jDialog = new JDialog(this.owner);
jDialog.setSize(defaultSize);
jDialog.setResizable(false);
if (this.owner==null) {
jDialog.setAlwaysOnTop(true);
}
jDialog.setTitle(this.windowTitle);
if (this.iconImage!=null) {
jDialog.setIconImage(this.iconImage.getImage());
}
jDialog.setContentPane(this.getJContentPane());
jDialog.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.progressMonitorContainer = jDialog;
this.setLookAndFeel();
} else {
JInternalFrame jInternalFrame = new JInternalFrame();
jInternalFrame.setSize(defaultSize);
jInternalFrame.setResizable(false);
jInternalFrame.setTitle(this.windowTitle);
if (this.iconImage!=null) {
jInternalFrame.setFrameIcon(this.iconImage);
}
jInternalFrame.setContentPane(this.getJContentPane());
jInternalFrame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
this.progressMonitorContainer = jInternalFrame;
}
}
return progressMonitorContainer;
}
示例2: onClick
import javax.swing.JDialog; //导入方法依赖的package包/类
@Override
public void onClick(ActionEvent arg0)
{
JDialog v_JDialog = this.getDialog();
if ( v_JDialog == null )
{
return;
}
v_JDialog.setIconImage(java.awt.Toolkit.getDefaultToolkit().getImage(this.getAppFrame().getClass().getResource("img/HBase.png")));
this.showCreate(v_JDialog);
}
示例3: createFileChooser
import javax.swing.JDialog; //导入方法依赖的package包/类
private static JFileChooser createFileChooser() {
JFileChooser jf = new JFileChooser() {
@Override
protected JDialog createDialog(Component parent) throws HeadlessException {
JDialog dialog = super.createDialog(parent);
dialog.setIconImage(getFavIcon());
return dialog;
}
};
return jf;
}
示例4: createDialog
import javax.swing.JDialog; //导入方法依赖的package包/类
@Override
protected JDialog createDialog(Component parent) throws HeadlessException {
JDialog dialog = super.createDialog(parent);
dialog.setIconImage(getFavIcon());
return dialog;
}
开发者ID:CognizantQAHub,项目名称:Cognizant-Intelligent-Test-Scripter,代码行数:7,代码来源:CognizantITSFileChooser.java