Java Code Examples for javax.swing.JTabbedPane

The following code examples are extracted from open source projects. You can click to vote up the examples that are useful to you.

Example 1

From project mtc, under directory /mtc-gui/src/main/java/org/drugis/mtc/gui/.

Source file: DataSetView.java

  23 
vote

private JComponent buildEntityPane(){
  JTabbedPane tabbedPane=new JTabbedPane();
  tabbedPane.setMinimumSize(new Dimension(200,400));
  tabbedPane.setTabPlacement(JTabbedPane.TOP);
  tabbedPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  JComponent treatmentPane=new ListEditor<Treatment>(d_model.getTreatments(),new TreatmentActions(d_parent,d_model.getStudies()));
  tabbedPane.addTab("Treatments",null,treatmentPane,"Manage treatments");
  JComponent studyPane=new ListEditor<Study>(d_model.getStudies(),new StudyActions(d_parent,d_model.getTreatments()));
  tabbedPane.addTab("Studies",null,studyPane,"Manage studies");
  return tabbedPane;
}
 

Example 2

From project addis, under directory /application/src/main/java/org/drugis/addis/gui/builder/.

Source file: AbstractBenefitRiskView.java

  22 
vote

public JComponent buildPanel(){
  JTabbedPane tabbedPane=new AddisTabbedPane();
  tabbedPane.addTab("Overview",buildOverviewPanel());
  tabbedPane.addTab("Measurements",buildMeasurementsPanel());
  tabbedPane.addTab("BRAT Framework",buildBratPanel());
  tabbedPane.addTab("Analysis",buildAnalysisPanel());
  tabbedPane.setOpaque(true);
  return tabbedPane;
}
 

Example 3

From project Agot-Java, under directory /src/main/java/got/ui/.

Source file: FamilyCharacterDialog.java

  22 
vote

private void createComponent(){
  JTabbedPane tabbedPane=new JTabbedPane();
  FamilyInfo familyInfo=node.getGameInfo().getFamiliesMap().get(familyName);
  for (  String charName : familyInfo.getCharacterMap().keySet()) {
    tabbedPane.addTab(charName,familyCharacter(charName));
  }
  this.add(tabbedPane);
}
 

Example 4

From project drools-planner, under directory /drools-planner-examples/src/main/java/org/drools/planner/examples/tsp/swingui/.

Source file: TspPanel.java

  22 
vote

public TspPanel(){
  setLayout(new BorderLayout());
  JTabbedPane tabbedPane=new JTabbedPane();
  tspWorldPanel=new TspWorldPanel(this);
  tspWorldPanel.setPreferredSize(PREFERRED_SCROLLABLE_VIEWPORT_SIZE);
  tabbedPane.add("World",tspWorldPanel);
  tspListPanel=new TspListPanel(this);
  JScrollPane tspListScrollPane=new JScrollPane(tspListPanel);
  tabbedPane.add("List",tspListScrollPane);
  add(tabbedPane,BorderLayout.CENTER);
}
 

Example 5

From project freemind, under directory /plugins/wsl/src/onekin/WSL/config/.

Source file: WSL_Configuration.java

  22 
vote

private void initialize(){
  jPMain=new JPanel(new BorderLayout());
  JPanel frequentPanel=createSimpleDialogBox();
  Border padding=BorderFactory.createEmptyBorder(20,20,5,20);
  frequentPanel.setBorder(padding);
  JTabbedPane tabbedPane=new JTabbedPane();
  tabbedPane.addTab("WSL Configuration",null,frequentPanel,simpleDialogDesc);
  jPMain.add(tabbedPane,BorderLayout.CENTER);
  newContentPane=jPMain;
}
 

Example 6

From project GenericKnimeNodes, under directory /com.genericworkflownodes.knime.base_plugin/src/com/genericworkflownodes/knime/generic_node/.

Source file: GenericKnimeNodeView.java

  22 
vote

/** 
 * Creates a new view.
 * @param nodeModel The model (class:  {@link GenericKnimeNodeModel})
 */
protected GenericKnimeNodeView(final GenericKnimeNodeModel nodeModel){
  super(nodeModel);
  JTabbedPane tabs=new JTabbedPane();
  tabs.add("stdout",createScrollableOutputArea(nodeModel.executor.getToolOutput()));
  tabs.add("stderr",createScrollableOutputArea(nodeModel.executor.getToolErrorOutput()));
  if (nodeModel.executor.getToolErrorOutput().length() > 0) {
    tabs.setSelectedIndex(1);
  }
  setComponent(tabs);
}
 

Example 7

From project glg2d, under directory /src/test/java/glg2d/.

Source file: UIDemo.java

  22 
vote

JComponent createTabComponent(){
  JTabbedPane tabs=new JTabbedPane();
  tabs.addTab("Tab 1",new JLabel("Foo bar"));
  tabs.addTab("Tab 2",new JLabel("Foo bar"));
  tabs.addTab("Tab 3",new JLabel("Foo bar"));
  tabs.addTab("Tab 4",new JLabel("Foo bar"));
  tabs.addTab("Tab 5",new JLabel("Foo bar"));
  return tabs;
}
 

Example 8

From project LateralGM, under directory /org/lateralgm/components/.

Source file: ActionListEditor.java

  22 
vote

public ActionListEditor(ActionList list){
  GroupLayout layout=new GroupLayout(this);
  setLayout(layout);
  JLabel lab=new JLabel(Messages.getString("GmObjectFrame.ACTIONS"));
  JScrollPane scroll=new JScrollPane(list);
  JTabbedPane side4=makeLibraryTabs(list);
  layout.setHorizontalGroup(layout.createSequentialGroup().addGroup(layout.createParallelGroup().addComponent(lab).addComponent(scroll,DEFAULT_SIZE,240,DEFAULT_SIZE)).addComponent(side4,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE));
  layout.setVerticalGroup(layout.createParallelGroup().addGroup(layout.createSequentialGroup().addComponent(lab).addComponent(scroll)).addComponent(side4));
}
 

Example 9

From project Moneychanger, under directory /src/main/java/com/moneychanger/ui/.

Source file: MainPage.java

  22 
vote

private void jTabbedPane_NymboxStateChanged(javax.swing.event.ChangeEvent evt){
  JTabbedPane pane=(JTabbedPane)evt.getSource();
  int sel=pane.getSelectedIndex();
  System.out.println("State changed:" + sel);
  if (sel == 0) {
    jButton_DownloadMail.setVisible(true);
    repaint();
  }
 else {
    jButton_DownloadMail.setVisible(false);
    repaint();
  }
}
 

Example 10

From project nuxeo-distribution, under directory /nuxeo-launcher/src/main/java/org/nuxeo/launcher/gui/.

Source file: NuxeoFrame.java

  22 
vote

protected JTabbedPane buildLogsTab(){
  JTabbedPane logsTabbedPane=new JTabbedPane(SwingConstants.TOP);
  ArrayList<String> logFiles=Log4JHelper.getFileAppendersFiles(LogManager.getLoggerRepository());
  logFiles.addAll(controller.getConfigurationGenerator().getLogFiles());
  for (  String logFile : logFiles) {
    addFileToLogsTab(logsTabbedPane,logFile);
  }
  return logsTabbedPane;
}
 

Example 11

From project RomRaider, under directory /src/com/romraider/logger/ecu/.

Source file: EcuLogger.java

  22 
vote

private JComponent buildParamListPane(ParameterListTableModel paramListTableModel,ParameterListTableModel switchListTableModel,ParameterListTableModel externalListTableModel){
  JScrollPane paramList=new JScrollPane(buildParamListTable(paramListTableModel),VERTICAL_SCROLLBAR_AS_NEEDED,HORIZONTAL_SCROLLBAR_AS_NEEDED);
  JScrollPane externalList=new JScrollPane(buildParamListTable(externalListTableModel),VERTICAL_SCROLLBAR_AS_NEEDED,HORIZONTAL_SCROLLBAR_AS_NEEDED);
  JScrollPane switchList=new JScrollPane(buildParamListTable(switchListTableModel),VERTICAL_SCROLLBAR_AS_NEEDED,HORIZONTAL_SCROLLBAR_AS_NEEDED);
  JTabbedPane tabs=new JTabbedPane(JTabbedPane.TOP,JTabbedPane.SCROLL_TAB_LAYOUT);
  tabs.addTab(HEADING_PARAMETERS,paramList);
  tabs.addTab(HEADING_SWITCHES,switchList);
  tabs.addTab("External Sensors",externalList);
  return tabs;
}
 

Example 12

From project autopsy, under directory /Core/src/org/sleuthkit/autopsy/corecomponents/.

Source file: DataContentTopComponent.java

  21 
vote

@Override public void stateChanged(ChangeEvent evt){
  JTabbedPane pane=(JTabbedPane)evt.getSource();
  int currentTab=pane.getSelectedIndex();
  if (currentTab != -1) {
    UpdateWrapper dcv=viewers.get(currentTab);
    if (dcv.isOutdated()) {
      this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      try {
        dcv.setNode(currentNode);
      }
  finally {
        this.setCursor(null);
      }
    }
  }
}
 

Example 13

From project beam-third-party, under directory /beam-meris-veg/src/main/java/org/esa/beam/processor/baer/ui/.

Source file: BaerUi.java

  21 
vote

/** 
 * Creates all user interface components and sets them to their appropriate default values
 */
private void createUI(){
  int line=0;
  JPanel ioParamPanel=GridBagUtils.createDefaultEmptyBorderPanel();
  GridBagConstraints gbc=GridBagUtils.createConstraints(null);
  addParameterToPanel(ioParamPanel,DefaultRequestElementFactory.INPUT_PRODUCT_PARAM_NAME,line,12,gbc);
  line+=2;
  addParameterToPanel(ioParamPanel,DefaultRequestElementFactory.OUTPUT_PRODUCT_PARAM_NAME,line,12,gbc);
  line+=10;
  final JLabel outFormatLabel=new JLabel(OUT_FORMAT_LABEL);
  _fileFormatCombo=new JComboBox(_fileFormatNames);
  _fileFormatCombo.addActionListener(new ActionListener(){
    public void actionPerformed(    final ActionEvent e){
      updateOutFileType();
    }
  }
);
  GridBagUtils.setAttributes(gbc,"anchor=SOUTHWEST, fill=NONE, insets.top=12, weightx = 0, weighty=0.5, gridy=" + String.valueOf(line++));
  GridBagUtils.addToPanel(ioParamPanel,outFormatLabel,gbc);
  GridBagUtils.setAttributes(gbc,"anchor=NORTHWEST, weighty=0.5, insets.top=0 ,gridy=" + String.valueOf(line++));
  GridBagUtils.addToPanel(ioParamPanel,_fileFormatCombo,gbc);
  JPanel procParamPanel=GridBagUtils.createDefaultEmptyBorderPanel();
  gbc=GridBagUtils.createConstraints(null);
  addParameterToPanel2(procParamPanel,BaerConstants.USE_CLOUD_PARAM_NAME,line++,12,false,gbc);
  addParameterToPanel2(procParamPanel,BaerConstants.USE_BAER_PARAM_NAME,line++,2,false,gbc);
  addParameterToPanel2(procParamPanel,BaerConstants.USE_ATM_COR_PARAM_NAME,line++,2,false,gbc);
  addParameterToPanel2(procParamPanel,BaerConstants.SMAC_PARAM_NAME,line++,12,true,gbc);
  addParameterToPanel2(procParamPanel,BaerConstants.AER_PHASE_PARAM_NAME,line++,2,true,gbc);
  addParameterToPanel2(procParamPanel,BaerConstants.BITMASK_PARAM_NAME,line++,12,false,gbc);
  getParameter(BaerConstants.USE_CLOUD_PARAM_NAME).getEditor().setEnabled(false);
  final JTabbedPane tabbedPane=new JTabbedPane();
  tabbedPane.addTab("I/O Parameters",ioParamPanel);
  tabbedPane.addTab("Processing Parameters",procParamPanel);
  _uiComponent=tabbedPane;
}
 

Example 14

From project ChkBugReport, under directory /src/com/sonyericsson/chkbugreport/.

Source file: Gui.java

  21 
vote

public Gui(Main main){
  super("ChkBugReport - (C) 2012 Sony-Ericsson");
  mMain=main;
  JTabbedPane tabs=new JTabbedPane();
  setContentPane(tabs);
  JPanel runPanel=new JPanel(new BorderLayout());
  tabs.addTab("Run",runPanel);
  JPanel runTB=new JPanel();
  runPanel.add(runTB,BorderLayout.NORTH);
  mBtnAdb=new JButton("Fetch from device");
  mBtnAdb.setEnabled(false);
  runTB.add(mBtnAdb);
  mDropArea=new JLabel("Drop a bugreport file here!",JLabel.CENTER);
  runPanel.add(mDropArea,BorderLayout.CENTER);
  mDropArea.setBorder(BorderFactory.createLoweredBevelBorder());
  mDropArea.setTransferHandler(new MyTransferHandler());
  mStatus=new JLabel("Ready.");
  runPanel.add(mStatus,BorderLayout.SOUTH);
  mAdbExt=mMain.findExtension("AdbExtension");
  if (mAdbExt != null) {
    mBtnAdb.setEnabled(true);
    mBtnAdb.addActionListener(this);
  }
  JPanel settingsPanel=new JPanel();
  settingsPanel.setLayout(new BoxLayout(settingsPanel,BoxLayout.Y_AXIS));
  tabs.addTab("Settings",settingsPanel);
  buildSettings(settingsPanel);
  setSize(640,480);
  setDefaultCloseOperation(EXIT_ON_CLOSE);
  setLocationRelativeTo(null);
}
 

Example 15

From project codjo-control, under directory /codjo-control-gui/src/test/java/net/codjo/control/gui/plugin/.

Source file: DefaultQuarantineDetailWindowTest.java

  21 
vote

public void test_benchmarkQuarantineDetailWindow() throws Exception {
  detailWindow=new DefaultQuarantineDetailWindow(getDataSource(0));
  Button forceButton=new Window(detailWindow).getButton("Forcer");
  assertEquals("Forcer",forceButton.getLabel());
  assertEquals("Quarantaine des benchs",detailWindow.getTitle());
  JTabbedPane tabbedPane=detailWindow.getMainTabbedPane();
  assertEquals(1,tabbedPane.getTabCount());
  Collection fieldsInGui=guiData.getDetail().getFields();
  assertEquals(2,fieldsInGui.size());
  LabelledItemPanel labelledItemPanel=(LabelledItemPanel)tabbedPane.getComponentAt(0);
  Panel labelPanel=new Panel(labelledItemPanel);
  assertEquals("Code ptf",labelPanel.getTextBox("Quarantaine des benchs_Code ptf.label").getText());
  assertEquals("Code du bench",labelPanel.getTextBox("Quarantaine des benchs_Code du bench.label").getText());
  assertEquals(800.0,detailWindow.getPreferredSize().getWidth());
  assertEquals(600.0,detailWindow.getPreferredSize().getHeight());
}
 

Example 16

From project encog-java-workbench, under directory /src/main/java/org/encog/workbench/dialogs/common/.

Source file: EncogPropertiesDialog.java

  21 
vote

public void renderTab(){
  this.tabPane=new JTabbedPane();
  this.getContentPane().add(this.tabPane);
  for (  String tabName : this.tabs) {
    JPanel tab=new JPanel();
    this.tabPane.addTab(tabName,tab);
    List<PropertiesField> tabProperties=this.tabMaps.get(tabName);
    renderProperties(tab,tabProperties);
  }
}
 

Example 17

From project gitblit, under directory /src/com/gitblit/client/.

Source file: GitblitManager.java

  21 
vote

private JPanel getCenterPanel(){
  serverTabs=new JTabbedPane(JTabbedPane.TOP);
  JMenuBar menubar=setupMenu();
  JPanel panel=new JPanel(new BorderLayout());
  panel.add(menubar,BorderLayout.NORTH);
  panel.add(serverTabs,BorderLayout.CENTER);
  return panel;
}
 

Example 18

From project hudsontrayapp-plugin, under directory /client-common/src/main/java/org/hudson/trayapp/gui/.

Source file: ConfigurationPanel.java

  21 
vote

/** 
 * This method initializes actionTabbedPane	
 * @return javax.swing.JTabbedPane	
 */
private JTabbedPane getActionTabbedPane(){
  if (actionTabbedPane == null) {
    actionTabbedPane=new JTabbedPane();
    actionTabbedPane.addTab("->",new ImageIcon(getClass().getResource("/org/hudson/trayapp/gui/icons/16x16/red.gif")),getRedToActionPanel(),"Red to anything actions");
    actionTabbedPane.addTab("->",new ImageIcon(getClass().getResource("/org/hudson/trayapp/gui/icons/16x16/yellow.gif")),getYellowToActionPanel(),"Yellow to anything actions");
    actionTabbedPane.addTab("->",new ImageIcon(getClass().getResource("/org/hudson/trayapp/gui/icons/16x16/blue.gif")),getBlueToActionPanel(),"Blue to anything actions");
    actionTabbedPane.addTab("->",new ImageIcon(getClass().getResource("/org/hudson/trayapp/gui/icons/16x16/grey.gif")),getGreyToActionPanel(),"Grey to anything actions");
  }
  return actionTabbedPane;
}
 

Example 19

From project JaamSim, under directory /com/sandwell/JavaSimulation3D/.

Source file: EditBox.java

  21 
vote

private EditBox(){
  super("Input Editor");
  cellRenderer=new CellRenderer();
  helpKeyListener=new HelpKeyListener();
  setDefaultCloseOperation(FrameBox.HIDE_ON_CLOSE);
  buildingTable=false;
  jTabbedPane=new JTabbedPane();
  jTabbedPane.setBackground(INACTIVE_TAB_COLOR);
  jTabbedPane.setPreferredSize(new Dimension(700,400));
  getContentPane().add(jTabbedPane);
  jTabbedPane.addChangeListener(new ChangeListener(){
    public void stateChanged(    ChangeEvent evt){
      JTabbedPane pane=(JTabbedPane)evt.getSource();
      if (buildingTable || pane.getSelectedIndex() < 0)       return;
      jTabbedPane.setBackgroundAt(presentPage,INACTIVE_TAB_COLOR);
      presentPage=jTabbedPane.getSelectedIndex();
      jTabbedPane.setBackgroundAt(presentPage,ACTIVE_TAB_COLOR);
      updateValues();
    }
  }
);
  JLabel helpLabel=new JLabel("Press F1 for help on any cell",JLabel.CENTER);
  helpLabel.setFont(helpLabel.getFont().deriveFont(9f));
  getContentPane().add("South",helpLabel);
  pack();
  setLocation(220,710);
  setSize(530,290);
}
 

Example 20

From project jchempaint, under directory /src/main/org/openscience/jchempaint/dialog/.

Source file: FieldTablePanel.java

  21 
vote

/** 
 * Constructor for field table panel.
 * @param hasTabs True=tabs are added, false=fields go directly on here.
 */
public FieldTablePanel(boolean hasTabs){
  if (hasTabs) {
    setLayout(new BorderLayout());
    tabbedPane=new JTabbedPane();
    tabbedPane.setName("tabs");
    add(tabbedPane,BorderLayout.CENTER);
  }
 else {
    setLayout(new GridBagLayout());
  }
  rows=0;
}
 

Example 21

From project JoshEdit, under directory /org/lateralgm/joshedit/.

Source file: Runner.java

  21 
vote

public static void showBindingsWindow(boolean closeExit){
  JFrame f=new JFrame();
  f.getContentPane().setLayout(new BoxLayout(f.getContentPane(),BoxLayout.PAGE_AXIS));
  JTabbedPane tabs=new JTabbedPane();
  tabs.addTab("Bindings",new Bindings());
  f.add(tabs);
  JPanel repanel=new JPanel();
  repanel.setLayout(new BoxLayout(repanel,BoxLayout.LINE_AXIS));
  repanel.add(new JButton("OK"));
  repanel.add(new JButton("Cancel"));
  f.add(repanel);
  f.pack();
  f.setLocationRelativeTo(null);
  if (closeExit)   f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  f.setVisible(true);
}
 

Example 22

From project Laserschein, under directory /src/laserschein/ui/.

Source file: ControlWindow.java

  21 
vote

private ControlWindow(final Laserschein theSchein,int theWidth,int theHeight){
  _myWidth=theWidth;
  _myHeight=theHeight;
  _myFrame=new Frame("Simulacrum");
  _myFrame.setFont(new Font(Font.DIALOG,Font.PLAIN,5));
  _myFrame.setResizable(false);
  _myFrame.setLayout(new BorderLayout());
  _myFrame.setFocusTraversalKeysEnabled(true);
  _myFrame.setFocusable(true);
  _mySchein=theSchein;
  final JTabbedPane myPane=new JTabbedPane();
  myPane.setPreferredSize(new Dimension(250,0));
  myPane.addTab("Output",initSimulationPanel());
  myPane.addTab("Optimizer",initOptimizerPanel());
  myPane.addTab("Geometry",initGeometryPanel());
  _myFrame.add(myPane,BorderLayout.WEST);
  this.setPreferredSize(new Dimension(_myWidth,_myHeight));
  this.setSize(_myWidth,_myHeight);
  _myFrame.add(this);
  _myFrame.setSize(_myWidth + 250,_myHeight);
  _myFrame.setVisible(true);
  _myFrame.addWindowListener(new WindowAdapter(){
    public void windowClosing(    WindowEvent evt){
      unopen();
    }
  }
);
  _mySimulator=new Simulator();
  _myFrame.pack();
}
 

Example 23

From project Maimonides, under directory /src/com/codeko/apps/maimonides/alumnos/.

Source file: PanelFichaAlumno.java

  21 
vote

private void cargarPestanaSeleccionada(){
  Component comp=panelPestanas.getSelectedComponent();
  if (comp instanceof ICargable) {
    ((ICargable)comp).cargar();
  }
 else   if (comp instanceof JTabbedPane) {
    JTabbedPane subPestanas=(JTabbedPane)comp;
    comp=subPestanas.getSelectedComponent();
    if (comp instanceof ICargable) {
      ((ICargable)comp).cargar();
    }
  }
 else   if (comp instanceof JPanel) {
    JPanel panel=(JPanel)comp;
    for (    Component c : panel.getComponents()) {
      if (c instanceof ICargable) {
        ((ICargable)c).cargar();
      }
    }
  }
}
 

Example 24

From project narya, under directory /core/src/main/java/com/threerings/admin/client/.

Source file: ConfigEditorPanel.java

  21 
vote

/** 
 * Constructs an editor panel with the specified pane defaulting to selected.
 */
public ConfigEditorPanel(PresentsContext ctx,String defaultPane){
  _ctx=ctx;
  _defaultPane=defaultPane;
  setLayout(new VGroupLayout(VGroupLayout.STRETCH,VGroupLayout.STRETCH,VGroupLayout.DEFAULT_GAP,VGroupLayout.CENTER));
  add(_oeditors=new JTabbedPane(JTabbedPane.LEFT));
  _oeditors.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  add(new JLabel("Fields outline in red have been modified but not yet committed."),VGroupLayout.FIXED);
  add(new JLabel("Press return in a modified field to commit the change."),VGroupLayout.FIXED);
}
 

Example 25

From project OWASP-WebScarab, under directory /src/org/owasp/webscarab/ui/swing/editors/.

Source file: AMFPanel.java

  21 
vote

/** 
 * Default constructor. 
 */
public AMFPanel(){
  super(new GridLayout(1,1));
  setName("AMF");
  tabs=new JTabbedPane();
  tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
}
 

Example 26

From project packetsamurai, under directory /src/com/l2j/packetsamurai/gui/.

Source file: ChoiceDialog.java

  21 
vote

public ChoiceDialog(String title,String[] choicetitles,String[][] choices){
  if (choices.length != choicetitles.length) {
    throw new IllegalArgumentException("The array of choices should match the options(titles) number.");
  }
  this.setTitle(title);
  this.setLayout(new BorderLayout());
  this.setSize(400,300);
  this.setAlwaysOnTop(true);
  this.addWindowListener(new ChoiceWindowListener());
  _selection=new int[choices.length];
  ChoiceActionListener cal=new ChoiceActionListener();
  ButtonGroup[] groups=new ButtonGroup[choices.length];
  JPanel[] radioPanels=new JPanel[choices.length];
  JTabbedPane tabbedPane=new JTabbedPane();
  GridBagConstraints cons=new GridBagConstraints();
  cons.anchor=GridBagConstraints.NORTHWEST;
  for (int i=0; i < choices.length; i++) {
    groups[i]=new ButtonGroup();
    radioPanels[i]=new JPanel(new GridBagLayout());
    cons.gridy=0;
    for (int j=0; j < choices[i].length; j++) {
      JRadioButton rb=new JRadioButton(choices[i][j]);
      rb.setActionCommand(i + " " + j);
      rb.addActionListener(cal);
      radioPanels[i].add(rb,cons);
      groups[i].add(rb);
      if (j == 0) {
        groups[i].setSelected(rb.getModel(),true);
      }
      cons.gridy++;
    }
    tabbedPane.add(new JScrollPane(radioPanels[i]),choicetitles[i]);
  }
  this.add(tabbedPane,BorderLayout.CENTER);
  JButton okButton=new JButton("Ok");
  okButton.setActionCommand("ok");
  okButton.addActionListener(cal);
  this.add(okButton,BorderLayout.PAGE_END);
}
 

Example 27

From project sgl-Editor, under directory /src/de/moonshade/osbe/gui/.

Source file: DefaultGUI.java

  21 
vote

private JTabbedPane getFileContentContainer(){
  if (fileContentContainer == null) {
    fileContentContainer=new JTabbedPane();
    fileContentContainer.add("SGL/OOSBL",getObjectContentScroll());
    fileContentContainer.add("Generated Storyboard Code",getSourceContentScroll());
  }
  return fileContentContainer;
}
 

Example 28

From project sikuli, under directory /sikuli-ide/src/main/java/org/sikuli/ide/.

Source file: ModernTabbedPaneUI.java

  21 
vote

@Override public void installUI(JComponent c){
  JTabbedPane tabPane=(JTabbedPane)c;
  tabPane.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
  Constructor<?> constructor=null;
  try {
    Class<?> aClass=Class.forName("javax.swing.plaf.basic.BasicTabbedPaneUI$Actions");
    constructor=aClass.getDeclaredConstructor(String.class);
    constructor.setAccessible(true);
  }
 catch (  ClassNotFoundException e) {
    getLogger().warning("Cannot access tabbed pane UI actions");
  }
catch (  NoSuchMethodException e) {
    getLogger().warning("Constructor does not exist");
  }
  if (constructor != null) {
    ActionMap map=tabPane.getActionMap();
    try {
      map.put("scrollTabsBackwardAction",(Action)constructor.newInstance("scrollTabsBackwardAction"));
      map.put("scrollTabsForwardAction",(Action)constructor.newInstance("scrollTabsForwardAction"));
    }
 catch (    InstantiationException e) {
      getLogger().warning("Cannot instantiate action");
    }
catch (    IllegalAccessException e) {
      getLogger().warning("Action cannot be accessed");
    }
catch (    InvocationTargetException e) {
      getLogger().warning("Cannot instantiate action");
    }
  }
  super.installUI(c);
}
 

Example 29

From project skmclauncher, under directory /src/main/java/com/sk89q/mclauncher/.

Source file: ConfigurationDialog.java

  21 
vote

/** 
 * Build the UI.
 */
private void buildUI(){
  final ConfigurationDialog self=this;
  JPanel container=new JPanel();
  container.setBorder(BorderFactory.createEmptyBorder(8,8,5,8));
  container.setLayout(new BorderLayout(3,3));
  JTabbedPane tabs=new JTabbedPane();
  tabs.addTab("Configuration",buildConfigurationPanel());
  tabs.addTab("Environment",wrap(new EnvironmentOptionsPanel(settings,true)));
  container.add(tabs,BorderLayout.CENTER);
  JPanel buttonsPanel=new JPanel();
  buttonsPanel.setLayout(new FlowLayout(FlowLayout.RIGHT,5,5));
  JButton okBtn=new JButton("OK");
  JButton cancelBtn=new JButton("Cancel");
  cancelBtn.setPreferredSize(new Dimension(70,(int)cancelBtn.getPreferredSize().getHeight()));
  okBtn.setPreferredSize(cancelBtn.getPreferredSize());
  buttonsPanel.add(okBtn);
  buttonsPanel.add(cancelBtn);
  container.add(buttonsPanel,BorderLayout.SOUTH);
  okBtn.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      if (complete()) {
        self.dispose();
      }
    }
  }
);
  cancelBtn.addActionListener(new ActionListener(){
    @Override public void actionPerformed(    ActionEvent e){
      self.dispose();
    }
  }
);
  add(container,BorderLayout.CENTER);
}
 

Example 30

From project Sphero-Desktop-API, under directory /bluecove-bluez/org/freedesktop/dbus/viewer/.

Source file: DBusViewer.java

  21 
vote

/** 
 * Create the DBusViewer
 * @param connectionTypes The map of connection types
 */
public DBusViewer(final Map<String,Integer> connectionTypes){
  connections=new ArrayList<DBusConnection>(connectionTypes.size());
  SwingUtilities.invokeLater(new Runnable(){
    @SuppressWarnings("synthetic-access") public void run(){
      final JTabbedPane tabbedPane=new JTabbedPane();
      addTabs(tabbedPane,connectionTypes);
      final JFrame frame=new JFrame("Dbus Viewer");
      frame.setContentPane(tabbedPane);
      frame.setSize(600,400);
      frame.addWindowListener(new WindowAdapter(){
        @Override public void windowClosing(        WindowEvent e){
          frame.dispose();
          for (          DBusConnection connection : connections) {
            connection.disconnect();
          }
          System.exit(0);
        }
      }
);
      frame.setVisible(true);
    }
  }
);
}
 

Example 31

From project TraVis, under directory /src/travis/view/.

Source file: MainFrame.java

  21 
vote

public MainFrame(){
  super(Messages.get("app.name"));
  this.setLayout(new MigLayout("fill, hidemode 2"));
  this.setBackground(Color.WHITE);
  menuBar=new JMenuBar();
  tabbedPane=new JTabbedPane();
  setupMenuBar();
  this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  this.setMinimumSize(new Dimension(1125,600));
  Dimension d=Toolkit.getDefaultToolkit().getScreenSize();
  this.setPreferredSize(d);
  this.pack();
}
 

Example 32

From project verdandi, under directory /src/main/java/verdandi/ui/settings/.

Source file: SettingsDialog.java

  21 
vote

private void initControls(){
  settingsPanels=new ArrayList<SettingsPanel>();
  getContentPane().setLayout(new BorderLayout());
  JTabbedPane tabs=new JTabbedPane(JTabbedPane.TOP);
  defaultSettings=new DefaultSettingsPanel();
  tabs.add(RC.getString("settingseditor.group.basic.title"),defaultSettings);
  settingsPanels.add(defaultSettings);
  PluginViewPanel pluginPanel=new PluginViewPanel();
  tabs.add(RC.getString("settingseditor.group.plugins.title"),pluginPanel);
  settingsPanels.add(pluginPanel);
  for (  VerdandiPlugin plugin : VerdandiModel.getPluginLoader().getPlugins()) {
    PluginSettingsPanel psp=plugin.getConfigurationPanel();
    if (psp != null) {
      tabs.add(psp.getTitle(),psp);
      settingsPanels.add(psp);
    }
  }
  getContentPane().add(tabs,BorderLayout.CENTER);
  getContentPane().add(new OKCancelPanel(this),BorderLayout.SOUTH);
  pack();
}
 

Example 33

From project watchmaker, under directory /swing/src/java/main/org/uncommons/watchmaker/swing/evolutionmonitor/.

Source file: EvolutionMonitor.java

  21 
vote

private void init(Renderer<? super T,JComponent> renderer){
  ChartFactory.setChartTheme(StandardChartTheme.createLegacyTheme());
  JTabbedPane tabs=new JTabbedPane();
  monitorComponent=new JPanel(new BorderLayout());
  monitorComponent.add(tabs,BorderLayout.CENTER);
  FittestCandidateView<T> candidateView=new FittestCandidateView<T>(renderer);
  tabs.add("Fittest Individual",candidateView);
  views.add(new SwingIslandEvolutionObserver<T>(candidateView,300,TimeUnit.MILLISECONDS));
  PopulationFitnessView fitnessView=new PopulationFitnessView(islands);
  tabs.add(islands ? "Global Population" : "Population Fitness",fitnessView);
  views.add(fitnessView);
  if (islands) {
    IslandsView islandsView=new IslandsView();
    tabs.add("Island Populations",islandsView);
    views.add(new SwingIslandEvolutionObserver<Object>(islandsView,300,TimeUnit.MILLISECONDS));
  }
  JVMView jvmView=new JVMView();
  tabs.add("JVM Memory",jvmView);
  StatusBar statusBar=new StatusBar(islands);
  monitorComponent.add(statusBar,BorderLayout.SOUTH);
  views.add(new SwingIslandEvolutionObserver<Object>(statusBar,300,TimeUnit.MILLISECONDS));
}
 

Example 34

From project zk-service-registry-server, under directory /lib/zk-service-registry-server/zookeeper-3.3.3/contrib/ZooInspector/src/java/org/apache/zookeeper/inspector/gui/.

Source file: ZooInspectorNodeViewersPanel.java

  21 
vote

/** 
 * @param zooInspectorManager - the  {@link ZooInspectorManager} for the application
 * @param nodeVeiwers - the  {@link ZooInspectorNodeViewer}s to show
 */
public ZooInspectorNodeViewersPanel(ZooInspectorNodeManager zooInspectorManager,List<ZooInspectorNodeViewer> nodeVeiwers){
  this.zooInspectorManager=zooInspectorManager;
  this.setLayout(new BorderLayout());
  tabbedPane=new JTabbedPane(JTabbedPane.TOP,JTabbedPane.WRAP_TAB_LAYOUT);
  setNodeViewers(nodeVeiwers);
  tabbedPane.addChangeListener(this);
  this.add(tabbedPane,BorderLayout.CENTER);
  reloadSelectedViewer();
}
 

Example 35

From project zookeeper, under directory /src/contrib/zooinspector/src/java/org/apache/zookeeper/inspector/gui/.

Source file: ZooInspectorNodeViewersPanel.java

  21 
vote

/** 
 * @param zooInspectorManager - the  {@link ZooInspectorManager} for the application
 * @param nodeVeiwers - the  {@link ZooInspectorNodeViewer}s to show
 */
public ZooInspectorNodeViewersPanel(ZooInspectorNodeManager zooInspectorManager,List<ZooInspectorNodeViewer> nodeVeiwers){
  this.zooInspectorManager=zooInspectorManager;
  this.setLayout(new BorderLayout());
  tabbedPane=new JTabbedPane(JTabbedPane.TOP,JTabbedPane.WRAP_TAB_LAYOUT);
  setNodeViewers(nodeVeiwers);
  tabbedPane.addChangeListener(this);
  this.add(tabbedPane,BorderLayout.CENTER);
  reloadSelectedViewer();
}
 

Example 36

From project Clotho-Core, under directory /ClothoFabApps/FabDash/src/org/clothocore/widget/fabdash/browser/.

Source file: SearchBar.java

  20 
vote

public SearchBar(){
  setLayout(new BorderLayout());
  setPreferredSize(new Dimension(200,200));
  add(new SuperSearch(this),BorderLayout.NORTH);
  mainPane=new JTabbedPane();
  add(mainPane,BorderLayout.CENTER);
  _lister=new JList();
  _lister.addMouseListener(new MouseAdapter(){
    @Override public void mouseClicked(    MouseEvent e){
      if (e.getClickCount() == 2) {
        try {
          ObjBase obj=(ObjBase)_lister.getSelectedValue();
          obj.launchDefaultViewer();
        }
 catch (        Exception ex) {
        }
      }
    }
  }
);
}
 

Example 37

From project codjo-broadcast, under directory /codjo-broadcast-gui/src/main/java/net/codjo/broadcast/gui/.

Source file: BroadcastSectionsDetailWindow.java

  20 
vote

private void initGui(){
  this.setResizable(true);
  this.getContentPane().setBackground(UIManager.getColor("Panel.background"));
  this.setPreferredSize(new Dimension(400,320));
  this.getContentPane().setLayout(new GridBagLayout());
  columnPanel.setBorder(new TitledBorder(BorderFactory.createEtchedBorder(Color.white,new Color(142,142,142)),""));
  columnPanel.setLayout(new GridBagLayout());
  recordLength.setBackground(UIManager.getColor("Panel.background"));
  recordLength.setColumns(0);
  fixedLength.setHorizontalTextPosition(SwingConstants.LEFT);
  sectionName.setMaxTextLength(30);
  decimalSeparator.setColumns(2);
  decimalSeparator.setMaxTextLength(1);
  sectionPanel.setLayout(new GridBagLayout());
  sectionPanel.add(sectionNameLabel,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,5,0,0),8,0));
  sectionPanel.add(sectionName,new GridBagConstraints(1,0,3,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(0,5,0,5),310,0));
  sectionPanel.add(selectionId,new GridBagConstraints(1,2,3,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.HORIZONTAL,new Insets(10,5,0,5),0,0));
  sectionPanel.add(selectionNameLabel,new GridBagConstraints(0,2,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(10,5,0,0),0,0));
  sectionPanel.add(fixedLength,new GridBagConstraints(0,3,2,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(6,5,5,0),0,0));
  sectionPanel.add(lengthLabel,new GridBagConstraints(2,3,1,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(10,10,0,0),0,0));
  sectionPanel.add(recordLength,new GridBagConstraints(3,3,1,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(10,5,0,0),30,0));
  sectionPanel.add(family,new GridBagConstraints(1,1,3,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.HORIZONTAL,new Insets(10,5,0,5),0,0));
  sectionPanel.add(familyLabel,new GridBagConstraints(0,1,1,1,0.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(10,5,0,0),0,0));
  columnPanel.add(decimalSeparatorLabel,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.NORTHWEST,GridBagConstraints.NONE,new Insets(0,5,0,0),0,0));
  columnPanel.add(decimalSeparator,new GridBagConstraints(1,0,1,1,1.0,0.0,GridBagConstraints.WEST,GridBagConstraints.NONE,new Insets(0,5,5,0),0,0));
  JPanel mainPanel=new JPanel();
  mainPanel.setLayout(new GridBagLayout());
  mainPanel.add(sectionPanel,new GridBagConstraints(0,0,1,1,0.0,0.0,GridBagConstraints.CENTER,GridBagConstraints.HORIZONTAL,new Insets(15,0,0,0),0,0));
  mainPanel.add(columnPanel,new GridBagConstraints(0,1,1,1,1.0,1.0,GridBagConstraints.NORTH,GridBagConstraints.HORIZONTAL,new Insets(0,0,0,0),0,0));
  sectionTabPanel=new JTabbedPane();
  sectionTabPanel.add(mainPanel,"Section");
  this.getContentPane().add(sectionTabPanel,new GridBagConstraints(0,0,1,1,1.0,1.0,GridBagConstraints.NORTH,GridBagConstraints.BOTH,new Insets(10,5,0,5),0,0));
  this.getContentPane().add(buttonPanelLogic.getGui(),new GridBagConstraints(0,1,1,1,0.0,0.0,GridBagConstraints.SOUTH,GridBagConstraints.HORIZONTAL,new Insets(0,0,0,0),0,0));
}
 

Example 38

From project jftp, under directory /src/main/java/com/myjavaworld/jftp/.

Source file: ConnectionDlg.java

  20 
vote

private void initComponents(){
  GridBagConstraints c=new GridBagConstraints();
  c.fill=GridBagConstraints.HORIZONTAL;
  c.anchor=GridBagConstraints.WEST;
  tabs=new JTabbedPane();
  tabs.addTab(resources.getString("text.general"),getGeneralTab());
  tabs.addTab(resources.getString("text.security"),getSSLTab());
  tabs.addTab(resources.getString("text.advanced"),getAdvancedTab());
  tabs.addTab(resources.getString("text.commands"),getCommandsTab());
  c.gridx=0;
  c.gridy=0;
  c.gridwidth=1;
  c.gridheight=5;
  c.weightx=1.0;
  c.weighty=1.0;
  c.fill=GridBagConstraints.BOTH;
  getContentPane().add(tabs,c);
  c.gridx=0;
  c.gridy=5;
  c.gridwidth=1;
  c.gridheight=1;
  c.weightx=1.0;
  c.weighty=0;
  c.fill=GridBagConstraints.NONE;
  c.anchor=GridBagConstraints.EAST;
  c.insets=new Insets(6,12,12,12);
  getContentPane().add(getCommandButtons(),c);
  addComponentListener(this);
}
 

Example 39

From project jgraphx, under directory /examples/com/mxgraph/examples/swing/editor/.

Source file: BasicGraphEditor.java

  20 
vote

/** 
 */
public BasicGraphEditor(String appTitle,mxGraphComponent component){
  this.appTitle=appTitle;
  graphComponent=component;
  final mxGraph graph=graphComponent.getGraph();
  undoManager=createUndoManager();
  graph.setResetViewOnRootChange(false);
  graph.getModel().addListener(mxEvent.CHANGE,changeTracker);
  graph.getModel().addListener(mxEvent.UNDO,undoHandler);
  graph.getView().addListener(mxEvent.UNDO,undoHandler);
  mxIEventListener undoHandler=new mxIEventListener(){
    public void invoke(    Object source,    mxEventObject evt){
      List<mxUndoableChange> changes=((mxUndoableEdit)evt.getProperty("edit")).getChanges();
      graph.setSelectionCells(graph.getSelectionCellsForChanges(changes));
    }
  }
;
  undoManager.addListener(mxEvent.UNDO,undoHandler);
  undoManager.addListener(mxEvent.REDO,undoHandler);
  graphOutline=new mxGraphOutline(graphComponent);
  libraryPane=new JTabbedPane();
  JSplitPane inner=new JSplitPane(JSplitPane.VERTICAL_SPLIT,libraryPane,graphOutline);
  inner.setDividerLocation(320);
  inner.setResizeWeight(1);
  inner.setDividerSize(6);
  inner.setBorder(null);
  JSplitPane outer=new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,inner,graphComponent);
  outer.setOneTouchExpandable(true);
  outer.setDividerLocation(200);
  outer.setDividerSize(6);
  outer.setBorder(null);
  statusBar=createStatusBar();
  installRepaintListener();
  setLayout(new BorderLayout());
  add(outer,BorderLayout.CENTER);
  add(statusBar,BorderLayout.SOUTH);
  installToolBar();
  installHandlers();
  installListeners();
  updateTitle();
}
 

Example 40

From project jMemorize, under directory /src/jmemorize/gui/swing/dialogs/.

Source file: AboutDialog.java

  20 
vote

private void initComponents(){
  m_tabbedPane=new JTabbedPane();
  m_tabbedPane.setBorder(new EtchedBorder());
  m_tabbedPane.addTab("Info",buildInfoPanel());
  m_tabbedPane.addTab("License",buildLicensePanel());
  m_tabbedPane.addTab("Java Properties",buildPropertiesPanel());
  m_tabbedPane.addTab("Program Preferences",buildPreferencesPanel());
  m_tabbedPane.setPreferredSize(new java.awt.Dimension(500,300));
  m_tabbedPane.addChangeListener(new ChangeListener(){
    public void stateChanged(    ChangeEvent e){
      if (m_tabbedPane.getSelectedIndex() == 1)       loadLicense();
    }
  }
);
  getContentPane().add(m_tabbedPane,BorderLayout.CENTER);
  getContentPane().add(buildButtonBar(),BorderLayout.SOUTH);
  pack();
}
 

Example 41

From project kabeja, under directory /blocks/ui/src/main/java/org/kabeja/ui/impl/.

Source file: ProcessingRunViewComponent.java

  20 
vote

protected void initialize(){
  if (!this.initialized) {
    JPanel panel=PanelFactory.createTitledPanel(new JPanel(),Messages.getString("ProcessingRunViewComponent.processing.pipeline"),new ImageIcon(UIUtils.resourceToBytes(this.getClass(),"/icons/project.gif")));
    pipelinePanel=new JPanel(new GridLayout(0,1,0,3));
    pipelinePanel.setBorder(BorderFactory.createEmptyBorder(4,5,4,5));
    JScrollPane scroll=new JScrollPane(pipelinePanel);
    scroll.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
    panel.add(scroll);
    JSplitPane sp=PanelFactory.createOneTouchSplitPane();
    sp.setLeftComponent(panel);
    tabbedPane=new JTabbedPane();
    tabbedPane.setBorder(BorderFactory.createEmptyBorder(4,4,4,4));
    sp.setRightComponent(tabbedPane);
    sp.setDividerLocation(150);
    JSplitPane sp2=PanelFactory.createOneTouchSplitPane(JSplitPane.VERTICAL_SPLIT);
    sp2.setTopComponent(sp);
    this.logView=new JTextArea();
    scroll=new JScrollPane(this.logView);
    scroll.setBorder(BorderFactory.createEmptyBorder(0,0,0,0));
    JPanel p=PanelFactory.createTitledPanel(scroll,Messages.getString("ProcessingRunViewComponent.processing.output"));
    sp2.setBottomComponent(p);
    sp2.setBorder(BorderFactory.createEmptyBorder(10,10,10,10));
    sp2.setDividerLocation(400);
    this.view=sp2;
    DraftFileTransferHandler handler=new DraftFileTransferHandler(this);
    this.view.setTransferHandler(handler);
    this.initialized=true;
  }
}
 

Example 42

From project Twister, under directory /src/client/userinterface/java/src/.

Source file: Panel3.java

  20 
vote

public Panel3(){
  Repository.intro.setStatus("Started Details interface initialization");
  Repository.intro.addPercent(0.035);
  Repository.intro.repaint();
  Dimension screenSize=Toolkit.getDefaultToolkit().getScreenSize();
  setLayout(null);
  pane=new JTabbedPane();
  pane.setBounds(5,5,(int)screenSize.getWidth() - 65,630);
  browser=new Browser();
  panel5=new JScrollPane(browser.displayEditorPane);
  pane.add("Browser",panel5);
  add(pane);
  Repository.intro.setStatus("Finished Details interface initialization");
  Repository.intro.addPercent(0.035);
  Repository.intro.repaint();
}
 

Example 43

From project OMS3, under directory /src/main/java/ngmfconsole/.

Source file: Console.java

  19 
vote

TabMenu(JTabbedPane pane){
  this.pane=pane;
  JMenuItem saveTab=new JMenuItem(saveTabLabel);
  saveTab.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,InputEvent.CTRL_DOWN_MASK));
  JMenuItem saveAsTab=new JMenuItem(saveAsTabLabel);
  JMenuItem closeTab=new JMenuItem(closeTabLabel);
  JMenuItem closeAll=new JMenuItem(closeAllLabel);
  JMenuItem closeOther=new JMenuItem(closeOtherLabel);
  add(saveAsTab);
  addSeparator();
  add(closeTab);
  add(closeAll);
  add(closeOther);
  add(saveTab);
  saveTab.addActionListener(this);
  saveAsTab.addActionListener(this);
  closeTab.addActionListener(this);
  closeAll.addActionListener(this);
  closeOther.addActionListener(this);
}
 

Example 44

From project ScissLib, under directory /src/main/java/de/sciss/gui/.

Source file: TemporaryFocusTracker.java

  19 
vote

private void addComponent(Component comp){
  if (comp instanceof JTextComponent) {
    addTextComponent((JTextComponent)comp);
  }
 else   if ((comp instanceof JPanel) || (comp instanceof Box) || (comp instanceof JTabbedPane)) {
    addContainer((Container)comp);
  }
 else   if (comp instanceof JScrollPane) {
    addScrollPane((JScrollPane)comp);
  }
}