本文整理了Java中javax.swing.JPanel.setMinimumSize()
方法的一些代码示例,展示了JPanel.setMinimumSize()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JPanel.setMinimumSize()
方法的具体详情如下:
包路径:javax.swing.JPanel
类名称:JPanel
方法名:setMinimumSize
暂无
代码示例来源:origin: runelite/runelite
private void contract()
{
if (pluginPanel == null)
{
return;
}
pluginPanel.onDeactivate();
navContainer.setMinimumSize(new Dimension(0, 0));
navContainer.setMaximumSize(new Dimension(0, 0));
navContainer.setPreferredSize(new Dimension(0, 0));
navContainer.revalidate();
giveClientFocus();
frame.contractBy(pluginPanel.getWrappedPanel().getPreferredSize().width);
pluginPanel = null;
}
代码示例来源:origin: libgdx/libgdx
fontList.setVisibleRowCount(6);
fontList.setSelectedIndex(0);
fontScroll.setMinimumSize(new Dimension(220, fontList.getPreferredScrollableViewportSize().height));
GridBagConstraints.BOTH, new Insets(5, 0, 5, 5), 0, 0));
effectsPanel.setBorder(BorderFactory.createTitledBorder("Effects"));
effectsPanel.setMinimumSize(new Dimension(210, 1));
代码示例来源:origin: libgdx/libgdx
fontList.setVisibleRowCount(6);
fontList.setSelectedIndex(0);
fontScroll.setMinimumSize(new Dimension(220, fontList.getPreferredScrollableViewportSize().height));
GridBagConstraints.BOTH, new Insets(5, 0, 5, 5), 0, 0));
effectsPanel.setBorder(BorderFactory.createTitledBorder("Effects"));
effectsPanel.setMinimumSize(new Dimension(210, 1));
代码示例来源:origin: 4thline/cling
@PostConstruct
public void init() {
browserPanel.add(browserView.asUIComponent(), BorderLayout.CENTER);
browserPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 5));
browserPanel.setPreferredSize(new Dimension(250, 250));
browserPanel.setMinimumSize(new Dimension(250, 250));
infoPanel.add(deviceInfosView.asUIComponent(), BorderLayout.CENTER);
infoPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10));
infoPanel.setPreferredSize(new Dimension(675, 200));
infoPanel.setMinimumSize(new Dimension(650, 200));
eastWestSplitPane.setBorder(BorderFactory.createEmptyBorder());
eastWestSplitPane.setResizeWeight(0);
eastWestSplitPane.setLeftComponent(browserPanel);
eastWestSplitPane.setRightComponent(infoPanel);
northSouthSplitPane.setBorder(BorderFactory.createEmptyBorder());
northSouthSplitPane.setResizeWeight(0.8);
northSouthSplitPane.setTopComponent(eastWestSplitPane);
northSouthSplitPane.setBottomComponent(logView.asUIComponent());
add(toolbarView.asUIComponent(), BorderLayout.NORTH);
add(northSouthSplitPane, BorderLayout.CENTER);
setSize(new Dimension(975, 700));
setMinimumSize(new Dimension(975, 450));
setResizable(true);
}
代码示例来源:origin: runelite/runelite
navContainer.setMinimumSize(new Dimension(width, 0));
navContainer.setMaximumSize(new Dimension(width, Integer.MAX_VALUE));
navContainer.setPreferredSize(new Dimension(width, 0));
navContainer.revalidate();
cardLayout.show(navContainer, button.getTooltip());
代码示例来源:origin: runelite/runelite
topPanelBackButton.setPreferredSize(new Dimension(22, 0));
topPanelBackButton.setBorder(new EmptyBorder(0, 0, 0, 5));
topPanelBackButton.addActionListener(e -> openConfigList());
item.setMinimumSize(new Dimension(PANEL_WIDTH, 0));
name = cid.getItem().name();
JLabel configEntryName = new JLabel(name);
box.setPreferredSize(new Dimension(box.getPreferredSize().width, 25));
box.setRenderer(new ComboBoxListRenderer());
box.setForeground(Color.WHITE);
代码示例来源:origin: runelite/runelite
navContainer.setMinimumSize(new Dimension(0, 0));
navContainer.setMaximumSize(new Dimension(0, 0));
navContainer.setPreferredSize(new Dimension(0, 0));
代码示例来源:origin: magefree/mage
jScrollPaneTablesActive.getVerticalScrollBar().setPreferredSize(new Dimension(GUISizeHelper.scrollBarSize, 0));
jScrollPaneTablesActive.getHorizontalScrollBar().setPreferredSize(new Dimension(0, GUISizeHelper.scrollBarSize));
component.setFont(GUISizeHelper.menuFont);
Dimension newDimension = new Dimension((int) jPanelBottom.getPreferredSize().getWidth(), GUISizeHelper.menuFont.getSize() + 28);
jPanelBottom.setMinimumSize(newDimension);
jPanelBottom.setPreferredSize(newDimension);
jButtonFooterNext.setFont(GUISizeHelper.menuFont);
代码示例来源:origin: magefree/mage
pnlProxySettings.setMinimumSize(new java.awt.Dimension(0, 0));
代码示例来源:origin: magefree/mage
contentPane.setMinimumSize(new Dimension(540, 450));
((GridBagLayout) panel3.getLayout()).rowWeights = new double[]{1.0, 1.0E-4};
txtDeckList.setMinimumSize(new Dimension(250, 400));
txtDeckList.setPreferredSize(new Dimension(550, 400));
txtDeckList.setText(FORMAT_TEXT);
JScrollPane txtScrollableDeckList = new JScrollPane(txtDeckList);
代码示例来源:origin: magefree/mage
contentPane.setMinimumSize(new Dimension(540, 450));
((GridBagLayout) panel3.getLayout()).rowWeights = new double[]{1.0, 1.0E-4};
txtDeckList.setMinimumSize(new Dimension(250, 400));
txtDeckList.setPreferredSize(new Dimension(550, 400));
代码示例来源:origin: magefree/mage
panelSource.setMaximumSize(new java.awt.Dimension(65536, 55));
panelSource.setMinimumSize(new java.awt.Dimension(352, 55));
panelSource.setPreferredSize(new java.awt.Dimension(593, 55));
panelSource.setLayout(new javax.swing.BoxLayout(panelSource, javax.swing.BoxLayout.X_AXIS));
panelSourceLeft.setMinimumSize(new java.awt.Dimension(430, 30));
panelSourceLeft.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));
panelSourceRight.setMaximumSize(new java.awt.Dimension(130, 32767));
panelSourceRight.setMinimumSize(new java.awt.Dimension(130, 30));
panelSourceRight.setPreferredSize(new java.awt.Dimension(130, 100));
panelSourceRight.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEADING));
panelMode.setMaximumSize(new java.awt.Dimension(32869, 55));
panelMode.setMinimumSize(new java.awt.Dimension(322, 55));
panelMode.setPreferredSize(new java.awt.Dimension(100, 55));
panelMode.setLayout(new javax.swing.BoxLayout(panelMode, javax.swing.BoxLayout.LINE_AXIS));
panelModeInner.setMinimumSize(new java.awt.Dimension(430, 43));
panelModeInner.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT));
panelRedownload.setMaximumSize(new java.awt.Dimension(130, 32767));
panelRedownload.setMinimumSize(new java.awt.Dimension(130, 30));
panelRedownload.setPreferredSize(new java.awt.Dimension(130, 100));
panelRedownload.setLayout(new java.awt.BorderLayout());
panelProgress.setMaximumSize(new java.awt.Dimension(32777, 30));
panelProgress.setMinimumSize(new java.awt.Dimension(20, 30));
panelProgress.setPreferredSize(new java.awt.Dimension(564, 30));
代码示例来源:origin: magefree/mage
private void setGUISize() {
jSplitPane0.setDividerSize(GUISizeHelper.dividerBarSize);
jSplitPane1.setDividerSize(GUISizeHelper.dividerBarSize);
jSplitPane2.setDividerSize(GUISizeHelper.dividerBarSize);
stackObjects.setCardDimension(GUISizeHelper.handCardDimension);
txtSpellsCast.setFont(new Font(GUISizeHelper.gameDialogAreaFont.getFontName(), Font.BOLD, GUISizeHelper.gameDialogAreaFont.getSize()));
txtHoldPriority.setFont(new Font(GUISizeHelper.gameDialogAreaFont.getFontName(), Font.BOLD, GUISizeHelper.gameDialogAreaFont.getSize()));
GUISizeHelper.changePopupMenuFont(popupMenuTriggerOrder);
int newStackWidth = pnlHelperHandButtonsStackArea.getWidth() * GUISizeHelper.stackWidth / 100;
if (newStackWidth < 410) {
newStackWidth = 410;
}
Dimension newDimension = new Dimension(pnlHelperHandButtonsStackArea.getWidth() - newStackWidth, GUISizeHelper.handCardDimension.height + GUISizeHelper.scrollBarSize);
handContainer.setPreferredSize(newDimension);
handContainer.setMaximumSize(newDimension);
newDimension = new Dimension(newStackWidth, STACK_MIN_CARDS_OFFSET_Y + GUISizeHelper.handCardDimension.height + GUISizeHelper.scrollBarSize);
stackObjects.setPreferredSize(newDimension);
stackObjects.setMinimumSize(newDimension);
stackObjects.setMaximumSize(newDimension);
newDimension = new Dimension(newStackWidth, (int) pnlShortCuts.getPreferredSize().getHeight());
pnlShortCuts.setPreferredSize(newDimension);
pnlShortCuts.setMinimumSize(newDimension);
pnlShortCuts.setMaximumSize(newDimension);
}
代码示例来源:origin: magefree/mage
panelFlag = new javax.swing.JPanel();
cbFlag = new mage.client.util.gui.countryBox.CountryComboBox();
filler1 = new javax.swing.Box.Filler(new java.awt.Dimension(5, 0), new java.awt.Dimension(4, 0), new java.awt.Dimension(5, 32767));
btnFlagSearch = new javax.swing.JButton();
panelFast = new javax.swing.JPanel();
lblFastConnect.setName(""); // NOI18N
panelFlag.setMinimumSize(new java.awt.Dimension(50, 33));
panelFlag.setLayout(new javax.swing.BoxLayout(panelFlag, javax.swing.BoxLayout.LINE_AXIS));
代码示例来源:origin: magefree/mage
setMinimumSize(new java.awt.Dimension(30, 30));
setPreferredSize((!Beans.isDesignTime()) ?
(GUISizeHelper.editorCardDimension)
: (new Dimension(600, 600)));
setRequestFocusEnabled(false);
panelControl.setMaximumSize(new java.awt.Dimension(32767, 23));
panelControl.setMinimumSize(new java.awt.Dimension(616, 23));
panelControl.setName(""); // NOI18N
panelControl.setPreferredSize(new java.awt.Dimension(616, 23));
代码示例来源:origin: magefree/mage
txtPack1.setPreferredSize(new java.awt.Dimension(130, 22));
txtPack2.setPreferredSize(new java.awt.Dimension(130, 22));
txtPack3.setPreferredSize(new java.awt.Dimension(130, 22));
pnlLeft.setMaximumSize(new java.awt.Dimension(80, 132));
pnlLeft.setMinimumSize(new java.awt.Dimension(80, 132));
pnlLeft.setOpaque(false);
pnlLeft.setPreferredSize(new java.awt.Dimension(80, 132));
pnlRight.setFont(new java.awt.Font("Tahoma", 0, 10)); // NOI18N
pnlRight.setMaximumSize(new java.awt.Dimension(80, 132));
pnlRight.setMinimumSize(new java.awt.Dimension(80, 132));
pnlRight.setOpaque(false);
pnlRight.setPreferredSize(new java.awt.Dimension(80, 132));
代码示例来源:origin: nodebox/nodebox
colorField = new ColorField();
Dimension d = new Dimension(Integer.MAX_VALUE, 80);
JPanel topPanel = new JPanel();
topPanel.setLayout(new BorderLayout());
topPanel.setMinimumSize(d);
topPanel.setPreferredSize(d);
topPanel.setMaximumSize(d);
hexPanel.setMinimumSize(d);
hexPanel.setPreferredSize(d);
hexPanel.setMaximumSize(d);
panels = new ColorPanel[]{red, green, blue, alpha, hue, saturation, brightness};
d = new Dimension(120, Integer.MAX_VALUE);
rangeBox = new ColorRangeMenu();
rangeBox.setMinimumSize(d);
JButton okButton = new JButton(okAction);
d = new Dimension(Integer.MAX_VALUE, 30);
JPanel bottomPanel = new JPanel();
bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.X_AXIS));
bottomPanel.setMinimumSize(d);
bottomPanel.setPreferredSize(d);
bottomPanel.setMaximumSize(d);
代码示例来源:origin: ron190/jsql-injection
panel.add(new LightScrollPane(1, 1, 1, 1, textarea));
panel.setPreferredSize(new Dimension(600, 400));
panel.setMinimumSize(new Dimension(600, 400));
代码示例来源:origin: ron190/jsql-injection
panel.add(new LightScrollPane(1, 1, 1, 1, textarea));
panel.setPreferredSize(new Dimension(400, 250));
panel.setMinimumSize(new Dimension(400, 250));
代码示例来源:origin: winder/Universal-G-Code-Sender
setMinimumSize(new java.awt.Dimension(640, 520));
bottomTabbedPane.setMinimumSize(new java.awt.Dimension(0, 0));
bottomTabbedPane.setPreferredSize(new java.awt.Dimension(468, 100));
connectionPanel.setMaximumSize(new java.awt.Dimension(247, 100));
connectionPanel.setMinimumSize(new java.awt.Dimension(247, 100));
connectionPanel.setName("Connection"); // NOI18N
connectionPanel.setPreferredSize(new java.awt.Dimension(247, 100));
statusPanel.setMinimumSize(new java.awt.Dimension(247, 160));
statusPanel.setPreferredSize(new java.awt.Dimension(247, 160));
fileModePanel.setMinimumSize(new java.awt.Dimension(389, 150));
fileModePanel.setPreferredSize(new java.awt.Dimension(247, 258));
fileModePanel.setLayout(new java.awt.GridBagLayout());
内容来源于网络,如有侵权,请联系作者删除!