java.awt.Panel.setVisible()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(170)

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

Panel.setVisible介绍

暂无

代码示例

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

  1. private void createCheckboxes() {
  2. if (!boxesCreated) {
  3. ExpansionInfo[] allExpansions = ExpansionRepository.instance.getWithBoostersSortedByReleaseDate();
  4. for (ExpansionInfo exp : allExpansions) {
  5. JCheckBox pack = new JCheckBox();
  6. pack.setSelected(true);
  7. pack.setText(exp.getCode());
  8. pack.setToolTipText(exp.getName());
  9. pnlPacks.add(pack);
  10. }
  11. pnlPacks.setVisible(true);
  12. this.pack();
  13. boxesCreated = true;
  14. pnlPacks.validate();
  15. }
  16. }

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

  1. public void showDialog() {
  2. createCheckboxes();
  3. pnlPacks.setVisible(true);
  4. pnlPacks.revalidate();
  5. pnlPacks.repaint();
  6. this.pack();
  7. this.revalidate();
  8. this.repaint();
  9. this.setVisible(true);
  10. this.setModal(true);
  11. }

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. protected void hidePopup() {
  2. if (plist.isShowing()) {
  3. plist.setVisible(false);
  4. button.switchImage();
  5. }
  6. }

代码示例来源:origin: mikera/tyrant

  1. private Panel createSourceStatus() {
  2. sourceStatusBar = new Panel(new BorderLayout());
  3. sourceStatusLabel = new Label("Bob", Label.CENTER);
  4. sourceStatusBar.add(sourceStatusLabel, BorderLayout.CENTER);
  5. sourceStatusBar.setVisible(false);
  6. return sourceStatusBar;
  7. }

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. protected void showPopup() {
  2. if (! plist.isShowing()) {
  3. plist.setVisible(true);
  4. button.switchImage();
  5. updateParent();
  6. }
  7. }

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

  1. public void NewPanel(Frame fm)
  2. {
  3. Panel p= new Panel(null);
  4. fm.add(p);
  5. //p.setSize(100, 100);
  6. p.setBounds(10,10,250,100);
  7. p.setName("Panel");
  8. p.add(new JLabel("Test"));
  9. p.setVisible(true);
  10. }

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

  1. public void NewPanel(Frame fm)
  2. {
  3. Panel p= new Panel(null);
  4. fm.add(p);
  5. //p.setSize(100, 100);
  6. p.setBounds(10,10,250,100);
  7. p.setName("Panel");
  8. p.setVisible(true);
  9. }

代码示例来源:origin: mikera/tyrant

  1. protected void hideFindField() {
  2. findPanel.setVisible(false);
  3. findPanel.getParent().invalidate();
  4. findPanel.getParent().validate();
  5. }
  6. public InventoryScreen() {

代码示例来源:origin: mikera/tyrant

  1. public void run() {
  2. sourceStatusBar.setVisible(false);
  3. sourceStatusLabel.setText("There is an error creating the map");
  4. sourceStatusBar.getParent().invalidate();
  5. sourceStatusBar.getParent().validate();
  6. }
  7. });

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

  1. p.add(bb);
  2. p.setVisible(true);//already called a show for JFrame why you want to set Visible of Panel

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. editorp.setVisible(false);
  2. editorp.removeAll();
  3. editorp.add("Center", rh[i].getComponent());
  4. editorp.validate();
  5. editorp.setVisible(true);

代码示例来源:origin: mikera/tyrant

  1. public void actionPerformed(ActionEvent e) {
  2. String newText = sourceTextArea.getText();
  3. if(newText.equals(mapText)) return;
  4. mikera.tyrant.engine.Map newMap = new MapMaker().create(newText, true);
  5. if(newMap == null) {
  6. sourceStatusBar.setVisible(true);
  7. sourceStatusLabel.setText("There is an error creating the map");
  8. sourceStatusBar.getParent().invalidate();
  9. sourceStatusBar.getParent().validate();
  10. new Thread(ThingEditor.this).start();
  11. return;
  12. }
  13. if(designer != null) {
  14. designer.reloadMap(newMap);
  15. mapText = new MapMaker().store(newMap);
  16. sourceTextArea.setText(mapText);
  17. }
  18. }
  19. }

代码示例来源:origin: mikera/tyrant

  1. private void showFindField() {
  2. findPanel.setVisible(true);
  3. findField.requestFocus();
  4. findField.selectAll();
  5. inventoryPanel.filterThings(findField.getText());
  6. findPanel.getParent().invalidate();
  7. findPanel.getParent().validate();
  8. }
  9. }

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. public FakeComboBox(int size,
  2. int listSize,
  3. boolean editable,
  4. String imagePath1,
  5. String imagePath2)
  6. {
  7. super();
  8. list = new GoodList(this,listSize);
  9. list.addItemListener(this);
  10. Image down = Toolkit.getDefaultToolkit().getImage(imagePath1);
  11. Image left = Toolkit.getDefaultToolkit().getImage(imagePath2);
  12. setLayout(new BorderLayout());
  13. text = new TextField(size);
  14. text.setEditable(editable);
  15. text.addActionListener(this);
  16. button = new ImageButton(down, left);
  17. button.addActionListener( this );
  18. button.setActionCommand("popup");
  19. add(text,"Center");
  20. add(button,"East");
  21. plist = new Panel();
  22. plist.add(list);
  23. add(plist,"South");
  24. plist.setVisible(true);
  25. }

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. widget.setVisible(true);

代码示例来源:origin: mikera/tyrant

  1. findPanel.add(label, gridBagConstraints);
  2. findPanel.setVisible(false);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. widget.add("South", bpcl);
  2. widget.validate();
  3. widget.setVisible(true);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. widget.add("Center", centerComp);
  2. widget.validate();
  3. widget.setVisible(true);

代码示例来源:origin: org.w3c.jigsaw/jigsaw

  1. target.add("Center", ptarget);
  2. target.validate();
  3. target.setVisible(true);
  4. switchHelper(b[num]);
  5. } else {
  6. target.add("Center", ptarget);
  7. target.validate();
  8. target.setVisible(true);

代码示例来源:origin: google/sagetv

  1. embeddedPanel.setLayout(new BorderLayout());
  2. win.getContentPane().add(embeddedPanel);
  3. embeddedPanel.setVisible(false);
  4. win.getContentPane().add(rootPanel, "Center");

相关文章