本文整理汇总了Java中java.awt.Container.setVisible方法的典型用法代码示例。如果您正苦于以下问题:Java Container.setVisible方法的具体用法?Java Container.setVisible怎么用?Java Container.setVisible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.awt.Container
的用法示例。
在下文中一共展示了Container.setVisible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doHide
import java.awt.Container; //导入方法依赖的package包/类
@Override
protected void doHide() {
Container parent = contents.getParent();
if (parent != null) {
contents.getParent().remove (contents);
parent.repaint(bounds.x, bounds.y, bounds.width, bounds.height);
parent.setVisible(false);
}
//If doShow() was never called, we've modified the visibility
//of the contents component, which could cause problems elsewhere
contents.setVisible (true);
}
示例2: displaySection
import java.awt.Container; //导入方法依赖的package包/类
private void displaySection(Container sectionPanel,
String initPanelMethodName) {
if (sectionPanel.getComponentCount() == 0) {
invokeInitPanelMethod(initPanelMethodName);
}
sectionPanel.setVisible(true);
enlargeVerticallyAsNecessary();
}
示例3: loadOptions
import java.awt.Container; //导入方法依赖的package包/类
public static void loadOptions(final String name,
final Container component, final Properties properties) {
if (ResourceLoader.isParent(JFrame.class, component.getClass())) {
((JFrame) component).setBounds(getRectangle(name,
((JFrame) component).getBounds(), properties));
}
if (ResourceLoader.isParent(JDialog.class, component.getClass())) {
((JDialog) component).setBounds(getRectangle(name,
((JDialog) component).getBounds(), properties));
}
if (ResourceLoader.isParent(RowFindPanel.class, component.getClass())) {
component.setVisible(getBoolean(name + ".Visible",
component.isVisible(), properties));
((RowFindPanel) component).getJCheckBox().setSelected(
getBoolean(name + ".WO", ((RowFindPanel) component)
.getJCheckBox().isSelected(), properties));
}
for (int i = 0; i < component.getComponentCount(); i++) {
if (ResourceLoader.isParent(JTable.class, component.getComponent(i)
.getClass()))
getJTableOptions(name + "_" + i,
(JTable) component.getComponent(i), properties);
if (ResourceLoader.isParent(JSplitPane.class, component
.getComponent(i).getClass())) {
((JSplitPane) component.getComponent(i))
.setDividerLocation(getInteger(name + "__" + i,
((JSplitPane) component.getComponent(i))
.getDividerLocation(), properties));
}
if (ResourceLoader.isParent(Container.class, component
.getComponent(i).getClass()))
loadOptions(name + "X" + i,
(Container) component.getComponent(i), properties);
}
}
示例4: prepareControls
import java.awt.Container; //导入方法依赖的package包/类
@Override
protected void prepareControls() {
JFrame frame = new JFrame("Glass Pane children test");
frame.setLayout(null);
Container contentPane = frame.getContentPane();
contentPane.setLayout(new BorderLayout());
super.propagateAWTControls(contentPane);
Container glassPane = (Container) frame.getRootPane().getGlassPane();
glassPane.setVisible(true);
glassPane.setLayout(null);
internalFrame = new JInternalFrame("Internal Frame", true);
internalFrame.setBounds(50, 0, 200, 100);
internalFrame.setVisible(true);
glassPane.add(internalFrame);
internalFrame.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
lwClicked = true;
}
});
frame.setSize(300, 180);
frame.setLocationRelativeTo(null);
frame.setVisible(true);
}