javax.swing.JInternalFrame.setVisible()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中javax.swing.JInternalFrame.setVisible()方法的一些代码示例,展示了JInternalFrame.setVisible()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JInternalFrame.setVisible()方法的具体详情如下:
包路径:javax.swing.JInternalFrame
类名称:JInternalFrame
方法名:setVisible

JInternalFrame.setVisible介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

public static void main(String args[]) {
    SwingUtilities.invokeLater(() -> {
      JFrame frame = new JFrame();
      frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);

      JDesktopPane desktopPane = new JDesktopPane();
      DesktopManager dm = new MageDesktopManager();
      desktopPane.setDesktopManager(dm);
      JInternalFrame internalFrame = new JInternalFrame("Test Internal Frame", true, false, true, true);
      internalFrame.setSize(200, 150);
      internalFrame.setVisible(true);
      desktopPane.add(internalFrame);

      frame.add(desktopPane, BorderLayout.CENTER);
      frame.setSize(800, 600);
      frame.setVisible(true);
    });
  }
}

代码示例来源:origin: magefree/mage

@Override
public void setVisible(boolean value) {
  super.setVisible(value);
  if (value) {
    this.toFront();
  }
  if (modal) {
    this.setClosable(false);
    if (value) {
      startModal();
    } else if (SwingUtilities.isEventDispatchThread()) {
      stopModal();
    } else {
      try {
        SwingUtilities.invokeAndWait(() -> stopModal());
      } catch (InterruptedException ex) {
        LOGGER.fatal("MageDialog error", ex);
      } catch (InvocationTargetException ex) {
        LOGGER.fatal("MageDialog error", ex);
      }
    }
  }
}

代码示例来源:origin: pentaho/mondrian

jf.setVisible(true);
  jf.show();
} catch (Exception ex) {

代码示例来源:origin: pentaho/mondrian

jf.setMaximizable(true);
jf.setResizable(true);
jf.setVisible(true);
jf.setVisible(true);
jf.show();

代码示例来源:origin: pentaho/mondrian

jf.setMaximizable(true);
jf.setResizable(true);
jf.setVisible(true);

代码示例来源:origin: magefree/mage

if (frame.getTitle().equals("Waiting for players")) {
  frame.toFront();
  frame.setVisible(true);
  try {
    frame.setSelected(true);

代码示例来源:origin: pentaho/mondrian

schemaFrame.setMaximizable(true);
schemaFrame.setResizable(true);
schemaFrame.setVisible(true);

代码示例来源:origin: com.haulmont.thirdparty/swingx-core

@Override
  public void run() {
    JInternalFrame window = createInternalFrame(owner, pane);
    window.setVisible(true);                
  }
};

代码示例来源:origin: net.sf.squirrel-sql/squirrel-sql

@Override
public void setVisible(boolean aFlag)
{
 super.setVisible(aFlag);
 if(null != _widget)
 {
   _widget.setVisible(aFlag);
 }
}

代码示例来源:origin: org.swinglabs.swingx/swingx-all

@Override
  public void run() {
    JInternalFrame window = createInternalFrame(owner, pane);
    window.setVisible(true);                
  }
};

代码示例来源:origin: org.codehaus.jtstand/jtstand-desktop

public void run() {
    JInternalFrame window = createInternalFrame(owner, pane);
    window.setVisible(true);                
  }
};

代码示例来源:origin: org.scijava/scijava-ui-swing

@Override
public Result prompt() {
  dialog.setVisible(true);
  final Object value = pane.getValue();
  dialog.dispose();
  return resultMap.get(value);
}

代码示例来源:origin: zolyfarkas/spf4j

private void setFrames(SampleNode samples, String fileName) throws IOException {
 JInternalFrame frame = new StackDumpJInternalFrame(samples, fileName, false);
 frame.setVisible(true);
 desktopPane.add(frame, javax.swing.JLayeredPane.DEFAULT_LAYER);
}

代码示例来源:origin: org.scijava/scijava-ui-swing

@Override
public void setVisible(final boolean value) {
  super.setVisible(value);
  if (value) {
    startModal();
  }
  else {
    stopModal();
  }
}

代码示例来源:origin: stackoverflow.com

//JDesktopPane desktop = new JDesktopPane();
JInternalFrame internalFrame = new JInternalFrame("PDFAnnotation" + index, true, true, true, true);

internalFrame.setBounds(0, 0, 600, 100);

desktop.add(internalFrame);

PDFPanel p = new PDFPanel();
JPanel e = p.getJPanel();
internalFrame.add(e, BorderLayout.CENTER);
internalFrame.setVisible(true);
//this.add(desktop, BorderLayout.CENTER);

代码示例来源:origin: stackoverflow.com

private int count;

desktop.add(createInternalFrame(++count));

private JInternalFrame createInternalFrame(int number) {
  JInternalFrame jif = new JInternalFrame(
    "F" + number, true, true, true, false);
  int topLeft = 25 * number;
  jif.add(new JTextField(String.valueOf(number), 8));
  jif.pack();
  jif.setLocation(topLeft, topLeft);
  jif.setVisible(true);
  return jif;
}

代码示例来源:origin: org.solovyev/common-other

public static <T extends Number> JInternalFrame drawMatrix(int startX, int startY, int width, int height, String title, Color color, Matrix<T>... matrixes) {
  JInternalFrame jInternalFrame = new JInternalFrame(title, true, true, true, true);
  jInternalFrame.setBackground(Color.white);
  jInternalFrame.getContentPane().add(new PaintPanel<T>(startX, startY, width, height, color, matrixes));
  jInternalFrame.setBounds(0, 0,
      width + startX * 2 + 20,
      height + startY * 2 + 40);
  jInternalFrame.setVisible(true);
  return jInternalFrame;
}

代码示例来源:origin: locationtech/jts

/**
 * Workaround for bug: can't re-show internal frames. See bug parade 4138031.
 */
public static void show(JInternalFrame internalFrame, JDesktopPane desktopPane)
  throws PropertyVetoException {
  if (!desktopPane.isAncestorOf(internalFrame))
    desktopPane.add(internalFrame);
  internalFrame.setClosed(false);
  internalFrame.setVisible(true);
  internalFrame.toFront();
}

代码示例来源:origin: stackoverflow.com

JDesktopPane mainPanel;
JInternalFrame jif_test = new JInternalFrame();

public void centerJIF(JInternalFrame jif) {
  Dimension desktopSize = mainPanel.getSize();
  Dimension jInternalFrameSize = jif.getSize();
  int width = (desktopSize.width - jInternalFrameSize.width) / 2;
  int height = (desktopSize.height - jInternalFrameSize.height) / 2;
  jif.setLocation(width, height);
  jif.setVisible(true);
}

代码示例来源:origin: stackoverflow.com

asd t = new asd();
JInternalFrame internalFrame = new JInternalFrame();
internalFrame.setContentPane(t.getContentPane());
internalFrame.pack();

// set the internalFrame's location
// ...

internalFrame.setVisible(true);
dskp.add(internalFrame);

相关文章

JInternalFrame类方法