本文整理了Java中javax.swing.JTabbedPane
类的一些代码示例,展示了JTabbedPane
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTabbedPane
类的具体详情如下:
包路径:javax.swing.JTabbedPane
类名称:JTabbedPane
暂无
代码示例来源:origin: wiztools/rest-client
JPanel jp = new JPanel();
jp.setBorder(BorderFactory.createEmptyBorder(
RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jp.setLayout(new BorderLayout());
JPanel jp_south = new JPanel();
jp_south.setLayout(new FlowLayout(FlowLayout.CENTER));
JButton jb_generate = new JButton("Generate");
jb_generate.setMnemonic('g');
getRootPane().setDefaultButton(jb_generate);
jb_generate.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
generate();
jp_help.setBorder(BorderFactory.createEmptyBorder(
RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jp_help.setLayout(new BorderLayout());
jp_help.add(jp_help_south, BorderLayout.SOUTH);
JTabbedPane jtp = new JTabbedPane();
jtp.setBorder(BorderFactory.createEmptyBorder(
RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jtp.addTab("Encoder/Decoder", jp);
jtp.addTab("Help", jp_help);
代码示例来源:origin: deathmarine/Luyten
public void run() {
try {
Thread.sleep(500);
String internalName = FindBox.class.getName();
TypeReference type = metadataSystem.lookupType(internalName);
TypeDefinition resolvedType = null;
if ((type == null) || ((resolvedType = type.resolve()) == null)) {
return;
}
StringWriter stringwriter = new StringWriter();
PlainTextOutput plainTextOutput = new PlainTextOutput(stringwriter);
plainTextOutput
.setUnicodeOutputEnabled(decompilationOptions.getSettings().isUnicodeOutputEnabled());
settings.getLanguage().decompileType(resolvedType, plainTextOutput, decompilationOptions);
String decompiledSource = stringwriter.toString();
OpenFile open = new OpenFile(internalName, "*/" + internalName, getTheme(), mainWindow);
open.setContent(decompiledSource);
JTabbedPane pane = new JTabbedPane();
pane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
pane.addTab("title", open.scrollPane);
pane.setSelectedIndex(pane.indexOfTab("title"));
} catch (Exception e) {
Luyten.showExceptionDialog("Exception!", e);
}
}
}.start();
代码示例来源:origin: igniterealtime/Smack
private void createDebug() {
frame = new JFrame("Smack Debug Window");
frame.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent evt) {
tabbedPane = new JTabbedPane();
JPanel informationPanel = new JPanel();
informationPanel.setLayout(new BoxLayout(informationPanel, BoxLayout.Y_AXIS));
informationPanel.add(extensionProvidersPanel);
tabbedPane.add("Smack Info", informationPanel);
menu.add(menuItem);
tabbedPane.addMouseListener(new PopupListener(menu));
frame.getContentPane().add(tabbedPane);
frame.setSize(650, 400);
代码示例来源:origin: deathmarine/Luyten
private boolean isTabInForeground(OpenFile open) {
String title = open.name;
int selectedIndex = house.getSelectedIndex();
return (selectedIndex >= 0 && selectedIndex == house.indexOfTab(title));
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private static void createTabs(){
tabbedPane = new JTabbedPane();
canvasPanel1 = new JPanel();
canvasPanel1.setLayout(new BorderLayout());
tabbedPane.addTab("jME3 Canvas 1", canvasPanel1);
canvasPanel2 = new JPanel();
canvasPanel2.setLayout(new BorderLayout());
tabbedPane.addTab("jME3 Canvas 2", canvasPanel2);
frame.getContentPane().add(tabbedPane);
currentPanel = canvasPanel1;
}
代码示例来源:origin: igniterealtime/Smack
/**
* Shows the new debugger in the debug window.
*
* @param debugger the new debugger to show
*/
private void showNewDebugger(EnhancedDebugger debugger) {
if (frame == null) {
createDebug();
}
debugger.tabbedPane.setName("XMPPConnection_" + tabbedPane.getComponentCount());
tabbedPane.add(debugger.tabbedPane, tabbedPane.getComponentCount() - 1);
tabbedPane.setIconAt(tabbedPane.indexOfComponent(debugger.tabbedPane), connectionCreatedIcon);
frame.setTitle(
"Smack Debug Window -- Total connections: " + (tabbedPane.getComponentCount() - 1));
// Keep the added debugger for later access
debuggers.add(debugger);
}
代码示例来源:origin: magefree/mage
panelGlobal = new javax.swing.JPanel();
fillerGlobal1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
labelGlobal = new javax.swing.JLabel();
buttonStop = new javax.swing.JButton();
fillerglobal2 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
tabsList = new javax.swing.JTabbedPane();
tabMain = new javax.swing.JPanel();
panelInfo = new javax.swing.JPanel();
fillerInfo1 = new javax.swing.Box.Filler(new java.awt.Dimension(0, 5), new java.awt.Dimension(0, 5), new java.awt.Dimension(32767, 5));
labelInfo = new javax.swing.JLabel();
labelSource = new javax.swing.JLabel();
buttonOK = new javax.swing.JButton();
getContentPane().setLayout(new java.awt.BorderLayout());
getContentPane().add(panelGlobal, java.awt.BorderLayout.NORTH);
tabsList.setTabLayoutPolicy(javax.swing.JTabbedPane.SCROLL_TAB_LAYOUT);
panelRedownload.setLayout(new java.awt.BorderLayout());
tabsList.addTab("Standard download", new javax.swing.ImageIcon(getClass().getResource("/buttons/card_panel.png")), tabMain); // NOI18N
tabsList.addTab("Custom download", new javax.swing.ImageIcon(getClass().getResource("/buttons/list_panel.png")), tabCustom); // NOI18N
getContentPane().add(tabsList, java.awt.BorderLayout.CENTER);
代码示例来源:origin: magefree/mage
tabsPanel = new javax.swing.JTabbedPane();
tabMain = new javax.swing.JPanel();
main_gamelog = new javax.swing.JPanel();
cbGameLogAutoSave = new javax.swing.JCheckBox();
cbDraftLogAutoSave = new javax.swing.JCheckBox();
cbGameJsonLogAutoSave = new javax.swing.JCheckBox();
main_card = new javax.swing.JPanel();
showCardName = new javax.swing.JCheckBox();
tooltipDelayLabel = new javax.swing.JLabel();
tooltipDelay = new javax.swing.JSlider();
showFullImagePath = new javax.swing.JCheckBox();
tabsPanel.setMinimumSize(new java.awt.Dimension(532, 451));
tabsPanel.addTab("Main", tabMain);
tabsPanel.addTab("GUI Size", tabGuiSize);
tabsPanel.addTab("Phases & Priority", tabPhases);
tabsPanel.addTab("Images", tabImages);
tabsPanel.addTab("Sounds", tabSounds);
tabsPanel.addTab("Avatars", tabAvatars);
tabsPanel.addTab("Connection", tabConnection);
tabsPanel.addTab("Controls", tabControls);
代码示例来源:origin: winder/Universal-G-Code-Sender
jTabbedPane1 = new javax.swing.JTabbedPane();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem3 = new javax.swing.JMenuItem();
jogUnitsGroup = new javax.swing.ButtonGroup();
scrollWindowCheckBox = new javax.swing.JCheckBox();
bottomTabbedPane = new javax.swing.JTabbedPane();
commandsPanel = new javax.swing.JPanel();
commandLabel = new javax.swing.JLabel();
commandTextField = new com.willwinder.universalgcodesender.uielements.components.CommandTextArea(backend);
consoleScrollPane = new javax.swing.JScrollPane();
commandTableScrollPane = new javax.swing.JScrollPane();
commandTable = new com.willwinder.universalgcodesender.uielements.components.GcodeTable();
controlContextTabbedPane = new javax.swing.JTabbedPane();
machineControlPanel = new javax.swing.JPanel();
actionPanel = new javax.swing.JPanel();
resetCoordinatesButton = new javax.swing.JButton();
returnToZeroButton = new javax.swing.JButton();
softResetMachineControl = new javax.swing.JButton();
bottomTabbedPane.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
bottomTabbedPane.setMinimumSize(new java.awt.Dimension(0, 0));
bottomTabbedPane.setPreferredSize(new java.awt.Dimension(468, 100));
bottomTabbedPane.addTab("Commands", commandsPanel);
bottomTabbedPane.addTab("Command Table", commandTableScrollPane);
代码示例来源:origin: pentaho/mondrian
java.awt.GridBagConstraints gridBagConstraints;
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel1 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
getContentPane().setLayout(new java.awt.GridBagLayout());
jPanel1.setLayout(new java.awt.GridBagLayout());
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTHWEST;
gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4);
jPanel1.add(jLabel1, gridBagConstraints);
jTabbedPane1.addTab(
getResourceConverter().getString(
"preferences.jdbcPanel.title", "JDBC"), jPanel1);
gridBagConstraints.weightx = 1.0;
gridBagConstraints.weighty = 1.0;
getContentPane().add(jTabbedPane1, gridBagConstraints);
gridBagConstraints.anchor = java.awt.GridBagConstraints.SOUTHEAST;
gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 180);
getContentPane().add(testButton, gridBagConstraints);
代码示例来源:origin: marytts/marytts
jButton_SaveOptions = new javax.swing.JButton();
jButton_CancelOptions = new javax.swing.JButton();
jTabbedPane_Options = new javax.swing.JTabbedPane();
jPanel_AudioOptions = new javax.swing.JPanel();
jLabel_AudioMixer = new javax.swing.JLabel();
cbAudioSource = new javax.swing.JComboBox();
jButton_Record = new javax.swing.JButton();
jLabel_dBMin = new javax.swing.JLabel();
jLabel_dBMax = new javax.swing.JLabel();
jPanel_TimingOptions = new javax.swing.JPanel();
jTabbedPane_Options.setBackground(javax.swing.UIManager.getDefaults().getColor("TabbedPane.highlight"));
org.jdesktop.layout.GroupLayout.DEFAULT_SIZE,
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(jLabel_Message)).addContainerGap()));
jTabbedPane_Options.addTab("Audio", jPanel_AudioOptions);
org.jdesktop.layout.GroupLayout.PREFERRED_SIZE).add(jLabel_SilenceDuration)
.add(jLabel_SilenceDurationBeforeRecUnits)).add(141, 141, 141)));
jTabbedPane_Options.addTab("Timing", jPanel_TimingOptions);
.addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED).add(jCheckBox_RedAlertMode)
.addContainerGap(207, Short.MAX_VALUE)));
jTabbedPane_Options.addTab("Display", jPanel_DisplayOptions);
jTabbedPane_Options.getAccessibleContext().setAccessibleName("Timing");
代码示例来源:origin: wiztools/rest-client
JTabbedPane jtp = new JTabbedPane();
jtp.setBorder(BorderFactory.createEmptyBorder(
RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jtp.addTab(key, UIUtil.getFlowLayoutPanelLeftAligned((JPanel)panels.get(key)));
JPanel jp_encp = new JPanel();
jp_encp.setBorder(BorderFactory.createEmptyBorder(
RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jp_encp.setLayout(new BorderLayout(RESTViewImpl.BORDER_WIDTH, RESTViewImpl.BORDER_WIDTH));
jp_encp.add(jtp, BorderLayout.CENTER);
JPanel jp_encp_south = new JPanel();
jp_encp_south.setLayout(new FlowLayout(FlowLayout.CENTER));
JButton jb_ok = new JButton("Ok");
this.getRootPane().setDefaultButton(jb_ok);
jb_ok.setMnemonic('o');
jb_ok.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent arg0) {
代码示例来源:origin: vulnersCom/burp-vulners-scanner
rootPanel = new JPanel();
rootPanel.setLayout(new GridLayoutManager(5, 19, new Insets(0, 0, 0, 0), -1, -1));
tabbedPane1 = new JTabbedPane();
tabbedPane1.setTabPlacement(1);
rootPanel.add(tabbedPane1, new GridConstraints(0, 0, 5, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_VERTICAL, GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
tabbedPane1.addTab("Scan rules", panel1);
final JLabel label1 = new JLabel();
label1.setFont(new Font(label1.getFont().getName(), Font.BOLD, 14));
btnRulesLoad = new JButton();
btnRulesLoad.setText("Load");
btnRuleAdd = new JButton();
tabbedPane1.addTab("Results", panel3);
tabbedPane1.addTab("Options", panel4);
代码示例来源:origin: magefree/mage
jPanel2 = new javax.swing.JPanel();
tabPane = new javax.swing.JTabbedPane();
tabResult = new javax.swing.JLayeredPane();
pnlText = new javax.swing.JLayeredPane();
lblGameInfo = new javax.swing.JLabel();
lblMatchInfo = new javax.swing.JLabel();
lblAdditionalInfo = new javax.swing.JLabel();
lblResultImage = new javax.swing.JLabel();
tabStatistics = new javax.swing.JPanel();
lblDurationGame = new javax.swing.JLabel();
txtDurationGame = new javax.swing.JLabel();
lblPlayerInfo = new javax.swing.JLabel();
txtPlayerInfo = new javax.swing.JLabel();
btnOk = new javax.swing.JButton();
lblResultImage.setBounds(0, 0, 610, 250);
tabPane.addTab("Result", tabResult);
lblDurationGame.setText("Duration game:");
);
tabPane.addTab("Statistics", tabStatistics);
代码示例来源:origin: stackoverflow.com
JTable table = new JTable (12, 5);
JButton button = new JButton ("Button");
JPanel panel = new JPanel ();
panel.setLayout (new BorderLayout ());
panel.add (table, BorderLayout.CENTER);
panel.add (button, BorderLayout.SOUTH);
JTabbedPane tabbedPane = new JTabbedPane ();
tabbedPane.addTab ("Tab", panel);
JFrame frame = new JFrame ();
frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
frame.getContentPane ().setLayout (new BorderLayout ());
frame.getContentPane ().add (tabbedPane, BorderLayout.CENTER);
frame.pack ();
frame.setVisible (true);
代码示例来源:origin: magefree/mage
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel6 = new javax.swing.JPanel();
pnlProxy = new javax.swing.JPanel();
lblProxyServer = new javax.swing.JLabel();
txtIdeaTitle = new javax.swing.JTextField();
lblProxyPort = new javax.swing.JLabel();
txtEmail = new javax.swing.JTextField();
lblProxyUserName = new javax.swing.JLabel();
cbFeedbackType = new javax.swing.JComboBox();
lblProxyType = new javax.swing.JLabel();
pnlProxy.setLayout(pnlProxyLayout);
pnlProxyLayout.setHorizontalGroup(
pnlProxyLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
);
jTabbedPane1.addTab("Give feedback", jPanel6);
sendButton.setText("Send");
sendButton.addActionListener(evt -> sendButtonActionPerformed(evt));
);
jTabbedPane1.getAccessibleContext().setAccessibleName("Feedback");
代码示例来源:origin: wildfly/wildfly
cache.addChangeListener(model);
frame=new JFrame("ReplCacheDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
add(new JScrollPane(table));
JPanel key=new JPanel(new FlowLayout(FlowLayout.LEFT));
key.add(new JLabel("Key "));
key.add(key_field);
add(key);
setOpaque(true);
root_pane.addTab("Data", this);
JPanel perf_panel=new JPanel();
perf_panel.setLayout(new BoxLayout(perf_panel, BoxLayout.Y_AXIS));
perf_panel.setOpaque(true);
root_pane.addTab("Perf test", perf_panel);
perf_panel.add(status);
perf_panel.add(perf_buttons);
frame.setContentPane(root_pane);
frame.pack();
frame.getRootPane().setDefaultButton(put_button);
代码示例来源:origin: wiztools/rest-client
JPanel jp = this;
jp.setLayout(new BorderLayout(5, 5));
JTabbedPane jtp = new JTabbedPane();
JPanel jp_summary = new JPanel();
jl_runCount.setFont(UIUtil.FONT_BIG);
jl_failureCount.setFont(UIUtil.FONT_BIG);
jl_errorCount.setFont(UIUtil.FONT_BIG);
jp_t.setLayout(new FlowLayout(FlowLayout.LEFT));
jp_t.add(jp_summary);
jtp.add("Summary", jp_t);
jt.setPreferredScrollableViewportSize(d);
jsp_jt_failures = new JScrollPane(jt);
jtp.add("Failures", jsp_jt_failures);
jt.setPreferredScrollableViewportSize(d);
jsp_jt_errors = new JScrollPane(jt);
jtp.add("Errors", jsp_jt_errors);
jtp.add("Trace", jsp_jta_trace);
代码示例来源:origin: stackoverflow.com
JTabbedPane tabPane = new JTabbedPane();
StringBuffer sb;
String header = "<html><body><table border=1 width=100%>";
System.getProperty(propStrings[ii])));
tabPane.addTab(
"System",
getOutputWidgetForContent(sb.toString()));
environment.get(envStrings[ii])));
tabPane.addTab(
"Environment",
getOutputWidgetForContent(sb.toString()));
tabPane.addTab(
"Graphics Environment",
getOutputWidgetForContent(sb.toString()));
JPanel fontTable = new JPanel(new BorderLayout(3, 1));
tabPane.add("Fonts", new JScrollPane(fontTable));
suffix));
tabPane.add("Locales",
getOutputWidgetForContent(sb.toString()));
代码示例来源:origin: org.netbeans.api/org-openide-dialogs
tabbedPane = new JTabbedPane(JTabbedPane.BOTTOM);
tabbedPane.addTab(NbBundle.getMessage(WizardDescriptor.class, "CTL_ContentName"), contentPanel);
tabbedPane.addTab(NbBundle.getMessage(WizardDescriptor.class, "CTL_HelpName"), htmlBrowser);
tabbedPane.setEnabledAt(1, false);
tabbedPane.setOpaque(false);
panelName.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, panelName.getForeground()));
panelName.setFont(doDeriveFont(panelName.getFont(), Font.BOLD));
JPanel labelPanel = new JPanel(new BorderLayout());
labelPanel.add(panelName, BorderLayout.NORTH);
labelPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 11));
rightPanel.setBorder(BorderFactory.createEmptyBorder(0, 12, 11, 11));
panelName.setLabelFor(labelPanel);
JPanel errorPanel = new JPanel(new BorderLayout());
errorPanel.setBorder(BorderFactory.createEmptyBorder(0, 12, 12, 11));
messagePane = new FixedHeightPane ();
内容来源于网络,如有侵权,请联系作者删除!