本文整理了Java中java.awt.Panel.setVisible()
方法的一些代码示例,展示了Panel.setVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Panel.setVisible()
方法的具体详情如下:
包路径:java.awt.Panel
类名称:Panel
方法名:setVisible
暂无
代码示例来源:origin: magefree/mage
private void createCheckboxes() {
if (!boxesCreated) {
ExpansionInfo[] allExpansions = ExpansionRepository.instance.getWithBoostersSortedByReleaseDate();
for (ExpansionInfo exp : allExpansions) {
JCheckBox pack = new JCheckBox();
pack.setSelected(true);
pack.setText(exp.getCode());
pack.setToolTipText(exp.getName());
pnlPacks.add(pack);
}
pnlPacks.setVisible(true);
this.pack();
boxesCreated = true;
pnlPacks.validate();
}
}
代码示例来源:origin: magefree/mage
public void showDialog() {
createCheckboxes();
pnlPacks.setVisible(true);
pnlPacks.revalidate();
pnlPacks.repaint();
this.pack();
this.revalidate();
this.repaint();
this.setVisible(true);
this.setModal(true);
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void hidePopup() {
if (plist.isShowing()) {
plist.setVisible(false);
button.switchImage();
}
}
代码示例来源:origin: mikera/tyrant
private Panel createSourceStatus() {
sourceStatusBar = new Panel(new BorderLayout());
sourceStatusLabel = new Label("Bob", Label.CENTER);
sourceStatusBar.add(sourceStatusLabel, BorderLayout.CENTER);
sourceStatusBar.setVisible(false);
return sourceStatusBar;
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
protected void showPopup() {
if (! plist.isShowing()) {
plist.setVisible(true);
button.switchImage();
updateParent();
}
}
代码示例来源:origin: stackoverflow.com
public void NewPanel(Frame fm)
{
Panel p= new Panel(null);
fm.add(p);
//p.setSize(100, 100);
p.setBounds(10,10,250,100);
p.setName("Panel");
p.add(new JLabel("Test"));
p.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
public void NewPanel(Frame fm)
{
Panel p= new Panel(null);
fm.add(p);
//p.setSize(100, 100);
p.setBounds(10,10,250,100);
p.setName("Panel");
p.setVisible(true);
}
代码示例来源:origin: mikera/tyrant
protected void hideFindField() {
findPanel.setVisible(false);
findPanel.getParent().invalidate();
findPanel.getParent().validate();
}
public InventoryScreen() {
代码示例来源:origin: mikera/tyrant
public void run() {
sourceStatusBar.setVisible(false);
sourceStatusLabel.setText("There is an error creating the map");
sourceStatusBar.getParent().invalidate();
sourceStatusBar.getParent().validate();
}
});
代码示例来源:origin: stackoverflow.com
p.add(bb);
p.setVisible(true);//already called a show for JFrame why you want to set Visible of Panel
代码示例来源:origin: org.w3c.jigsaw/jigsaw
editorp.setVisible(false);
editorp.removeAll();
editorp.add("Center", rh[i].getComponent());
editorp.validate();
editorp.setVisible(true);
代码示例来源:origin: mikera/tyrant
public void actionPerformed(ActionEvent e) {
String newText = sourceTextArea.getText();
if(newText.equals(mapText)) return;
mikera.tyrant.engine.Map newMap = new MapMaker().create(newText, true);
if(newMap == null) {
sourceStatusBar.setVisible(true);
sourceStatusLabel.setText("There is an error creating the map");
sourceStatusBar.getParent().invalidate();
sourceStatusBar.getParent().validate();
new Thread(ThingEditor.this).start();
return;
}
if(designer != null) {
designer.reloadMap(newMap);
mapText = new MapMaker().store(newMap);
sourceTextArea.setText(mapText);
}
}
}
代码示例来源:origin: mikera/tyrant
private void showFindField() {
findPanel.setVisible(true);
findField.requestFocus();
findField.selectAll();
inventoryPanel.filterThings(findField.getText());
findPanel.getParent().invalidate();
findPanel.getParent().validate();
}
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
public FakeComboBox(int size,
int listSize,
boolean editable,
String imagePath1,
String imagePath2)
{
super();
list = new GoodList(this,listSize);
list.addItemListener(this);
Image down = Toolkit.getDefaultToolkit().getImage(imagePath1);
Image left = Toolkit.getDefaultToolkit().getImage(imagePath2);
setLayout(new BorderLayout());
text = new TextField(size);
text.setEditable(editable);
text.addActionListener(this);
button = new ImageButton(down, left);
button.addActionListener( this );
button.setActionCommand("popup");
add(text,"Center");
add(button,"East");
plist = new Panel();
plist.add(list);
add(plist,"South");
plist.setVisible(true);
}
代码示例来源:origin: org.w3c.jigsaw/jigsaw
widget.setVisible(true);
代码示例来源:origin: mikera/tyrant
findPanel.add(label, gridBagConstraints);
findPanel.setVisible(false);
代码示例来源:origin: org.w3c.jigsaw/jigsaw
widget.add("South", bpcl);
widget.validate();
widget.setVisible(true);
代码示例来源:origin: org.w3c.jigsaw/jigsaw
widget.add("Center", centerComp);
widget.validate();
widget.setVisible(true);
代码示例来源:origin: org.w3c.jigsaw/jigsaw
target.add("Center", ptarget);
target.validate();
target.setVisible(true);
switchHelper(b[num]);
} else {
target.add("Center", ptarget);
target.validate();
target.setVisible(true);
代码示例来源:origin: google/sagetv
embeddedPanel.setLayout(new BorderLayout());
win.getContentPane().add(embeddedPanel);
embeddedPanel.setVisible(false);
win.getContentPane().add(rootPanel, "Center");
内容来源于网络,如有侵权,请联系作者删除!