javax.swing.JTabbedPane.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(11.2k)|赞(0)|评价(0)|浏览(148)

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

JTabbedPane.<init>介绍

暂无

代码示例

代码示例来源: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: stackoverflow.com

public static void main(String[] args) {
  JFrame frame = new JFrame();
  frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
  frame.setBounds(0, 0, 300, 400);
  frame.setLayout(null);
  final JTabbedPane tabbedPane = new JTabbedPane();
  tabbedPane.addTab("One", new JPanel());
  tabbedPane.addTab("Two", new JPanel());
  tabbedPane.addTab("Three", new JPanel());
  tabbedPane.addChangeListener(new ChangeListener() {
    public void stateChanged(ChangeEvent e) {
      System.out.println("Tab: " + tabbedPane.getSelectedIndex());
    }
  });
  tabbedPane.setBounds(0, 0, 300, 400);
  frame.add(tabbedPane);
  frame.setVisible(true);
}

代码示例来源:origin: kiegroup/optaplanner

public TravelingTournamentPanel() {
  awayMatchIcon = new ImageIcon(getClass().getResource("awayMatch.png"));
  setLayout(new BorderLayout());
  JTabbedPane tabbedPane = new JTabbedPane();
  teamsPanel = new TimeTablePanel<>();
  tabbedPane.add("Teams", new JScrollPane(teamsPanel));
  add(tabbedPane, BorderLayout.CENTER);
  setPreferredSize(PREFERRED_SCROLLABLE_VIEWPORT_SIZE);
}

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

setLayout(new BorderLayout());
JPanel jp = new JPanel();
jp.setLayout(new BorderLayout());
JTabbedPane tb = new JTabbedPane();
tb.setUI(new CustomTabbedPaneUI());
tb.add("Tab1", new JTextArea(""));
tb.add("Tab2", new JTextArea(""));
tb.add("Tab3", new JTextArea(""));
tb.add("Tab4", new JTextArea(""));
tb.add("Tab5", new JTextArea(""));
jp.add(tb, BorderLayout.CENTER);
add(jp, BorderLayout.CENTER);
tb.setEnabledAt(1, false);
tb.setEnabledAt(3, false);
frame.getContentPane().add(new TabbedPane());
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(500, 200);
frame.setVisible(true);

代码示例来源:origin: protegeproject/protege

public OWLClassDescriptionEditor(OWLEditorKit editorKit, OWLClassExpression expression) {
  this.expression = expression;
  editingComponent = new JPanel(new BorderLayout());
  tabbedPane = new JTabbedPane();
  tabbedPane.setFocusable(false);
  editingComponent.add(tabbedPane);
  editingComponent.setPreferredSize(new Dimension(600, 400));
  tabbedPane.addChangeListener(changeListener);
}

代码示例来源:origin: deathmarine/Luyten

JPanel panel2 = new JPanel();
panel2.setLayout(new BoxLayout(panel2, 1));
panel2.setBorder(BorderFactory.createTitledBorder("Structure"));
panel2.add(new JScrollPane(tree));
house = new JTabbedPane();
house.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
house.addChangeListener(new TabChangeListener());
JPanel panel = new JPanel();
panel.setLayout(new BoxLayout(panel, 1));
panel.setBorder(BorderFactory.createTitledBorder("Code"));
panel.add(house);
this.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
this.setDividerLocation(250 % mainWindow.getWidth());

代码示例来源: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();
jLabel5 = new javax.swing.JLabel();
cbSpeakerBitsPerSample = new javax.swing.JComboBox();
jPanel_TimingOptions = new javax.swing.JPanel();
jLabel_BufferAdded = new javax.swing.JLabel();
jSpinner_BufferAdded = new javax.swing.JSpinner();
                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);

代码示例来源:origin: AliView/AliView

private void init(){
  tabbedPane = new JTabbedPane();
  //		tabbedPane.setPreferredSize(new Dimension(650,500));
  tabbedPane.add(TAB_GENERAL, new GeneralSettingsPanel(this));
  tabbedPane.add(TAB_PRIMER, new PrimerSettingsPanel(this));
  tabbedPane.add(TAB_ALIGN_ALL, new AlignerALLItemsPanel(this));
  tabbedPane.add(TAB_ALIGN_ADD, new AlignerADDItemsPanel(this));
  tabbedPane.add(TAB_EXTERNAL_COMMANDS, new CmdItemsPanel(this));
  tabbedPane.add(TAB_MEMORY, new MemorySettingsPanel(this));
  this.getContentPane().add(tabbedPane);
  this.setIconImage(AppIcons.getProgramIconImage());
  this.setTitle("Settings");
  this.setPreferredSize(new Dimension(750,600));
}

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

public void run() {
  JFrame frame = new JFrame();
  frame.getContentPane().setLayout( new BorderLayout() );
  frame.setBounds( 50, 50, 600, 600 );
  frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
  JTabbedPane pane = new JTabbedPane();
  pane.addTab( "Lorem", new JLabel("Lorem") );
  pane.addTab( "Ipsum", new JLabel("Ipsum") );
  pane.addTab( "Dolor", new JLabel("Dolor") );
  pane.addTab( "Sit", new JLabel("Sit") );
  pane.addTab( "Amet", new JLabel("Amet") );
  pane.putClientProperty("Nimbus.Overrides", dialogTheme);
  JTabbedPane secondPane = new JTabbedPane();
  secondPane.addTab( "Lorem", new JLabel("Lorem") );
  secondPane.addTab( "Ipsum", new JLabel("Ipsum") );
  secondPane.addTab( "Amet", new JLabel("Amet") );
  frame.getContentPane().setLayout( new BorderLayout() );
  frame.getContentPane().add( pane, BorderLayout.NORTH );
  frame.getContentPane().add( secondPane, BorderLayout.CENTER );

代码示例来源:origin: net.sourceforge.jadex/jadex-tools-base-swing

public void run()
  {
    ClasspathPanel    classpath    = new ClasspathPanel();
    JTabbedPane    tabs    = new JTabbedPane();
    tabs.addTab("Platform Config", new PlatformConfigPanel(classpath));
    tabs.addTab("Classpath", classpath);
    
    JFrame    f    = new JFrame("Jadex Platform Configuration");
    f.getContentPane().add(tabs, BorderLayout.CENTER);
    f.pack();
    f.setLocation(SGUI.calculateMiddlePosition(f));
    f.setVisible(true);
  }
});

代码示例来源:origin: net.sf.squirrel-sql.plugins/graph

private void buildGui()
{
 getContentPane().setLayout(new GridBagLayout());
 GridBagConstraints gbc;
 tabPages = new JTabbedPane();
 gbc = new GridBagConstraints(0,0,1,1,1,1,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);
 getContentPane().add(tabPages, gbc);
 gbc = new GridBagConstraints(0,1,1,1,1,0,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH, new Insets(5,5,5,5), 0,0);
 getContentPane().add(createButtonPanel(), gbc);
}

代码示例来源:origin: wiztools/rest-client

private JTabbedPane initJTPResponse(){
  JTabbedPane jtp = new JTabbedPane();
  
  // Header Tab
  jtp.addTab("Headers", jp_res_headers.getComponent());
  
  // Response body
  jtp.addTab("Body", jp_res_body.getComponent());
  
  // Test result
  jtp.addTab("Test Result", jp_res_test.getComponent());
  
  // Stats
  jtp.addTab("Stats", jp_res_stats.getComponent());
  
  return jtp;
}

代码示例来源:origin: wiztools/rest-client

private JTabbedPane initJTPRequest(){
  JTabbedPane jtp = new JTabbedPane();
  jtp.addTab("Method", jp_req_method.getComponent());
  jtp.addTab("Header", jp_2col_req_headers);
  jtp.addTab("Cookie", jp_2col_req_cookies);
  jtp.add("Etc.", jp_req_etc.getComponent());

代码示例来源:origin: opentripplanner/OpenTripPlanner

public void init() {
  final JTabbedPane tabbedPane = new JTabbedPane();
  Container diffTab = makeDiffTab();
  tabbedPane.addTab("Main", null, mainTab,
      "Pretty much everything");
  tabbedPane.addTab("Prefs", null, prefsPanel,
      "Routing preferences");
  tabbedPane.addTab("Diff", null, diffTab, "multistate path diffs");

代码示例来源:origin: winder/Universal-G-Code-Sender

controlContextTabbedPane = new JTabbedPane();
actionPanel = new ActionPanel(backend);
macroEditPanel = new JScrollPane();
controlContextTabbedPane.addTab("Machine Control", actionPanel);
controlContextTabbedPane.addTab("Macros", macroEditPanel);
controlContextTabbedPane.addTab("Visualizer", visualizerPanel);

代码示例来源:origin: opentripplanner/OpenTripPlanner

private void initRightPanel(Container pane) {
  JPanel rightPanel = new JPanel();
  rightPanel.setLayout(new BorderLayout());
  pane.add(rightPanel, BorderLayout.LINE_END);
  JTabbedPane rightPanelTabs = new JTabbedPane();
  rightPanel.add(rightPanelTabs, BorderLayout.LINE_END);
  JScrollPane stScrollPane = new JScrollPane(pathStates);
  stScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
  rightPanelTabs.addTab("path states", stScrollPane);
  JScrollPane mdScrollPane = new JScrollPane(metadataList);
  mdScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
  rightPanelTabs.addTab("metadata", mdScrollPane);
  JScrollPane amScrollPane = new JScrollPane(annotationMatches);
  amScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
  rightPanelTabs.addTab("annotations", amScrollPane);

代码示例来源:origin: SonarSource/sonarqube

frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().add(splitPane, BorderLayout.CENTER);
tabbedPane = new JTabbedPane(JTabbedPane.TOP);
tabbedPane.setPreferredSize(new Dimension(500, 7));
splitPane.setRightComponent(tabbedPane);
tabbedPane.addTab("Component details", null, componentDetailsTab, null);
tabbedPane.addTab("Source", null, sourceTab, null);
tabbedPane.addTab("Highlighting", null, highlightingTab, null);

代码示例来源:origin: kiegroup/optaplanner

public CurriculumCoursePanel() {
  setLayout(new BorderLayout());
  JTabbedPane tabbedPane = new JTabbedPane();
  roomsPanel = new TimeTablePanel<>();
  tabbedPane.add("Rooms", new JScrollPane(roomsPanel));
  teachersPanel = new TimeTablePanel<>();
  tabbedPane.add("Teachers", new JScrollPane(teachersPanel));
  curriculaPanel = new TimeTablePanel<>();
  tabbedPane.add("Curricula", new JScrollPane(curriculaPanel));
  add(tabbedPane, BorderLayout.CENTER);
  setPreferredSize(PREFERRED_SCROLLABLE_VIEWPORT_SIZE);
}

代码示例来源:origin: edu.stanford.protege/org.protege.editor.owl

public OWLClassDescriptionEditor(OWLEditorKit editorKit, OWLClassExpression expression) {
  this.expression = expression;
  editingComponent = new JPanel(new BorderLayout());
  tabbedPane = new JTabbedPane();
  tabbedPane.setFocusable(false);
  editingComponent.add(tabbedPane);
  editingComponent.setPreferredSize(new Dimension(600, 400));
  tabbedPane.addChangeListener(changeListener);
}

代码示例来源: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();
);
jTabbedPane1.addTab("Give feedback", jPanel6);

相关文章

JTabbedPane类方法