Java Code Examples for javax.swing.JPanel.setAlignmentX()

The following are Jave code examples for showing how to use setAlignmentX() of the javax.swing.JPanel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: marathonv5   File: DialogDemo.java   View Source Code Vote up 6 votes
/**
 * Like createPane, but creates a pane with 2 columns of radio buttons. The
 * number of buttons passed in *must* be even.
 */
private JPanel create2ColPane(String description, JRadioButton[] radioButtons, JButton showButton) {
    JLabel label = new JLabel(description);
    int numPerColumn = radioButtons.length / 2;

    JPanel grid = new JPanel(new GridLayout(0, 2));
    for (int i = 0; i < numPerColumn; i++) {
        grid.add(radioButtons[i]);
        grid.add(radioButtons[i + numPerColumn]);
    }

    JPanel box = new JPanel();
    box.setLayout(new BoxLayout(box, BoxLayout.PAGE_AXIS));
    box.add(label);
    grid.setAlignmentX(0.0f);
    box.add(grid);

    JPanel pane = new JPanel(new BorderLayout());
    pane.add(box, BorderLayout.PAGE_START);
    pane.add(showButton, BorderLayout.PAGE_END);

    return pane;
}
 
Example 2
Project: jaer   File: SampleProbControlPanel.java   View Source Code Vote up 6 votes
/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
private void initComponents() {
	setToolTipText("Select a tab to configure an aspect of the device.");

	onchipBiasgenPanel = new JPanel();
	onchipBiasgenPanel.setLayout(new BoxLayout(onchipBiasgenPanel, BoxLayout.Y_AXIS));
	onchipBiasgenPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
	addTab("On-chip biases (biasgen)", (onchipBiasgenPanel));

	offchipDACPanel = new JPanel();
	offchipDACPanel.setLayout(new BoxLayout(offchipDACPanel, BoxLayout.Y_AXIS));
	addTab("Off-chip biases (DAC)", (offchipDACPanel));

	aerPanel = new JPanel();
	aerPanel.setLayout(new BoxLayout(aerPanel, BoxLayout.Y_AXIS));
	addTab("AER Config", (aerPanel));

	chipDiagPanel = new JPanel();
	chipDiagPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
	chipDiagPanel.setLayout(new BoxLayout(chipDiagPanel, BoxLayout.Y_AXIS));
	addTab("Chip Diag Config", (chipDiagPanel));

}
 
Example 3
Project: VISNode   File: NodeView.java   View Source Code Vote up 5 votes
/**
 * Builds a separator for the node parĂ¢metros
 *
 * @return JComponent
 */
private JComponent buildSeparator() {
    JSeparator separator = new JSeparator(JSeparator.HORIZONTAL);
    separator.setBorder(new EmptyBorder(0, 0, 0, 25));
    separator.setForeground(new Color(0xAAAAAA));
    separator.setBackground(new Color(0xAAAAAA));
    JPanel container = new JPanel(new BorderLayout());
    container.setBorder(new EmptyBorder(0, 10, 0, 10));
    container.add(separator);
    container.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    container.setOpaque(false);
    return container;
}
 
Example 4
Project: VISNode   File: NodeView.java   View Source Code Vote up 5 votes
/**
 * Build the label for the parameter
 *
 * @param text
 * @return JComponent
 */
private JComponent buildLabel(String text) {
    JLabel label = new JLabel(text, JLabel.LEFT);
    label.setBorder(new EmptyBorder(0, 15, 0, 0));
    label.setFont(new Font("Segoe UI", Font.PLAIN, 9));
    JPanel container = new JPanel(new BorderLayout(5, 0));
    container.add(label, BorderLayout.WEST);
    container.setAlignmentX(JLabel.LEFT_ALIGNMENT);
    container.setOpaque(false);
    return container;
}
 
Example 5
Project: hml   File: MyPanel.java   View Source Code Vote up 5 votes
public JPanel createVerticalPanel(boolean threeD) 
{
	JPanel p = new JPanel();
	p.setLayout(new BoxLayout(p, BoxLayout.Y_AXIS));
	p.setAlignmentY(TOP_ALIGNMENT);
	p.setAlignmentX(LEFT_ALIGNMENT);
	if(threeD) 
	{
		p.setBorder(loweredBorder);
	}
	return p;
}
 
Example 6
Project: Tarski   File: VizCustomizationPanel.java   View Source Code Vote up 5 votes
/** Constructs a customization panel.
 * @param divider - the JSplitPane separating the left-customization-half with the right-graph-half
 * @param vizState - the VizState object that will be customized by this customization panel
 */
public VizCustomizationPanel(JSplitPane divider, VizState vizState) {
   this.divider = divider;
   this.vizState = vizState;
   setBorder(null);
   setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
   zoomPane = new JPanel();
   zoomPane.setBorder(new OurBorder(false,false,true,false));
   zoomPane.setLayout(new BoxLayout(zoomPane, BoxLayout.Y_AXIS));
   zoomPane.setAlignmentX(0f);
   zoomPane.setBackground(wcolor);
   remakeAll();
}
 
Example 7
Project: org.alloytools.alloy   File: VizCustomizationPanel.java   View Source Code Vote up 5 votes
/**
 * Constructs a customization panel.
 * 
 * @param divider - the JSplitPane separating the left-customization-half
 *            with the right-graph-half
 * @param vizState - the VizState object that will be customized by this
 *            customization panel
 */
public VizCustomizationPanel(JSplitPane divider, VizState vizState) {
	this.divider = divider;
	this.vizState = vizState;
	setBorder(null);
	setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
	zoomPane = new JPanel();
	zoomPane.setBorder(new OurBorder(false, false, true, false));
	zoomPane.setLayout(new BoxLayout(zoomPane, BoxLayout.Y_AXIS));
	zoomPane.setAlignmentX(0f);
	zoomPane.setBackground(wcolor);
	remakeAll();
}
 
Example 8
Project: Equella   File: GResourceSelector.java   View Source Code Vote up 5 votes
@Override
public JComponent generateControl()
{
	field = new JTextField();
	field.setMaximumSize(new Dimension(Short.MAX_VALUE, 20));

	if( items.size() >= 1 )
	{
		field.setText(((Item) items.get(0)).getValue());
	}

	JButton browse = new JButton("Browse");
	browse.setIcon(new ImageIcon(getClass().getResource("/images/browse.gif")));
	browse.setHorizontalTextPosition(SwingConstants.RIGHT);
	Dimension browseSize = browse.getPreferredSize();
	browseSize.height = 20;
	browse.setMaximumSize(browseSize);
	browse.addActionListener(this);

	JPanel group = new JPanel();
	group.setLayout(new BoxLayout(group, BoxLayout.X_AXIS));
	group.add(field);
	group.add(Box.createRigidArea(new Dimension(5, 0)));
	group.add(browse);
	group.setAlignmentX(Component.LEFT_ALIGNMENT);

	return group;
}
 
Example 9
Project: Equella   File: WhereModel.java   View Source Code Vote up 5 votes
private void setup()
{
	editor = new JPanel(new BorderLayout(5, 0));
	editor.setAlignmentX(Component.LEFT_ALIGNMENT);
	editor.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(),
		BorderFactory.createEmptyBorder(2, 5, 2, 5)));

	editor.add(createButtons(), BorderLayout.EAST);
	editor.add(createCentre(), BorderLayout.CENTER);
}
 
Example 10
Project: Equella   File: AbstractBasicModel.java   View Source Code Vote up 5 votes
protected void setup()
{
	editor = new JPanel(new BorderLayout(5, 0));
	editor.setAlignmentX(Component.LEFT_ALIGNMENT);
	editor.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(),
		BorderFactory.createEmptyBorder(2, 5, 2, 5)));

	editor.add(createButtons(), BorderLayout.EAST);
	editor.add(createCentre(), BorderLayout.CENTER);
}
 
Example 11
Project: Equella   File: WorkflowModel.java   View Source Code Vote up 5 votes
@Override
protected void setup()
{
	editor = new JPanel(new BorderLayout(5, 0));
	editor.setAlignmentX(Component.LEFT_ALIGNMENT);
	editor.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createEtchedBorder(),
		BorderFactory.createEmptyBorder(2, 5, 2, 5)));

	editor.add(createTop(), BorderLayout.NORTH);
	editor.add(createButtons(), BorderLayout.EAST);
	editor.add(createCentre(), BorderLayout.CENTER);
}
 
Example 12
Project: hml   File: MyPanel.java   View Source Code Vote up 5 votes
public JPanel createHorizontalPanel(boolean threeD) 
{
	JPanel p = new JPanel();
	p.setLayout(new BoxLayout(p, BoxLayout.X_AXIS));
	p.setAlignmentY(TOP_ALIGNMENT);
	p.setAlignmentX(LEFT_ALIGNMENT);
	if(threeD) 
	{
		p.setBorder(loweredBorder);
	}
	return p;
}
 
Example 13
Project: jaer   File: CochleaLPControlPanel.java   View Source Code Vote up 5 votes
/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor.
 */
private void initComponents() {

	onchipBiasgenPanel = new JPanel();
	onchipBiasgenPanel.setLayout(new BoxLayout(onchipBiasgenPanel, BoxLayout.Y_AXIS));
	onchipBiasgenPanel.setAlignmentX(LEFT_ALIGNMENT);
	addTab("On-chip biases (biasgen)", (onchipBiasgenPanel));

	offchipDACPanel = new JPanel();
	offchipDACPanel.setLayout(new BoxLayout(offchipDACPanel, BoxLayout.Y_AXIS));
	addTab("Off-chip biases (DAC)", (offchipDACPanel));

	channelPanel = new JPanel();
	channelPanel.setLayout(new BoxLayout(channelPanel, BoxLayout.Y_AXIS));
	addTab("Channels", (channelPanel));

	scannerPanel = new JPanel();
	scannerPanel.setLayout(new BoxLayout(scannerPanel, BoxLayout.Y_AXIS));
	addTab("Scanner Config", (scannerPanel));

	aerPanel = new JPanel();
	aerPanel.setLayout(new BoxLayout(aerPanel, BoxLayout.Y_AXIS));
	addTab("AER Config", (aerPanel));

	adcPanel = new JPanel();
	adcPanel.setLayout(new BoxLayout(adcPanel, BoxLayout.Y_AXIS));
	addTab("ADC", (adcPanel));

	chipDiagPanel = new JPanel();
	chipDiagPanel.setAlignmentX(LEFT_ALIGNMENT);
	chipDiagPanel.setLayout(new BoxLayout(chipDiagPanel, BoxLayout.Y_AXIS));
	addTab("Chip Diag Config", (chipDiagPanel));
}
 
Example 14
Project: jaer   File: SPIConfigInt.java   View Source Code Vote up 5 votes
@Override
public JComponent makeGUIControl() {

	final JPanel pan = new JPanel();
	pan.setAlignmentX(Component.LEFT_ALIGNMENT);
	pan.setLayout(new BoxLayout(pan, BoxLayout.X_AXIS));

	final JLabel label = new JLabel(getName());
	label.setToolTipText(
		"<html>" + toString() + "<br>" + getDescription() + "<br>Enter value or use mouse wheel or arrow keys to change value.");
	pan.add(label);

	final JTextField tf = new JTextField();
	tf.setText(Integer.toString(get()));
	tf.setPreferredSize(prefDimensions);
	tf.setMaximumSize(maxDimensions);
	SPIConfigIntActions actionListeners = new SPIConfigIntActions(this);
	tf.addActionListener(actionListeners);
	tf.addFocusListener(actionListeners);
	tf.addKeyListener(actionListeners);
	tf.addMouseWheelListener(actionListeners);
	pan.add(tf);
	setControl(tf);
	addObserver(biasgen);	// This observer is responsible for sending data to hardware
	addObserver(this);		// This observer is responsible for GUI update. It calls the updateControl() method
	return pan;
}
 
Example 15
Project: jaer   File: PotPanel.java   View Source Code Vote up 5 votes
/** builds the panel of pots */
    private void buildPanel() {
        IPotSliderTextControl.allInstances.clear();
        potList=new ArrayList<Pot>(pots.getPots());
        componentList=new ArrayList<JComponent>();
        Collections.sort(potList, new PotDisplayComparator());
        potsPanel=new JPanel();
        potsPanel.setAlignmentX(RIGHT_ALIGNMENT);
        potsPanel.getInsets().set(0, 0, 0, 0);
        potsPanel.setLayout(new BoxLayout(potsPanel, BoxLayout.Y_AXIS));
        scrollPane=new JScrollPane(potsPanel);
        add(new PotSorter(componentList, potList));
        add(scrollPane);
        for(Pot p : potList) {
            JComponent s=p.makeGUIPotControl(); // make a bias control gui component
            s.setAlignmentX(RIGHT_ALIGNMENT);
            potsPanel.add(s);
            componentList.add(s);
            addBorderSetter(s);
        }
        potsPanel.add(Box.createVerticalGlue());
//        JPanel fillPanel=new JPanel();
//        fillPanel.setMinimumSize(new Dimension(0, 0));
//        fillPanel.setPreferredSize(new Dimension(0, 0));
//        fillPanel.setMaximumSize(new Dimension(32767, 32767));
//        potsPanel.add(fillPanel); // spacer at bottom so biases don't stretch out too much
    }
 
Example 16
Project: Tarski   File: OurTabbedSyntaxWidget.java   View Source Code Vote up 5 votes
/** Create a new tab with the given filename (if filename==null, we'll create a blank tab instead)
 * <p> If a text buffer with that filename already exists, we will just switch to it; else we'll read that file into a new tab.
 * @return false iff an error occurred
 */
public boolean newtab(String filename) {
   if (filename!=null) {
      filename = Util.canon(filename);
      for(int i=0; i<tabs.size(); i++) if (tabs.get(i).getFilename().equals(filename)) { if (i!=me) select(i); return true; }
   }
   final JLabel lb = OurUtil.label("", OurUtil.getVizFont().deriveFont(Font.BOLD), Color.BLACK, Color.WHITE);
   lb.setBorder(new OurBorder(BORDER, BORDER, Color.WHITE, BORDER));
   lb.addMouseListener(new MouseAdapter() {
      @Override public void mousePressed(MouseEvent e) { for(int i=0; i<tabs.size(); i++) if (tabs.get(i).obj1 == lb) select(i); }
   });
   JPanel h1 = OurUtil.makeH(4); h1.setBorder(new OurBorder(null, null, BORDER, null));
   JPanel h2 = OurUtil.makeH(3); h2.setBorder(new OurBorder(null, null, BORDER, null));
   JPanel pan = Util.onMac() ? OurUtil.makeVL(null, 2, OurUtil.makeHB(h1, lb, h2))
                             : OurUtil.makeVL(null, 2, OurUtil.makeHB(h1, lb, h2, GRAY), GRAY);
   pan.setAlignmentX(0.0f);
   pan.setAlignmentY(1.0f);
   OurSyntaxWidget text = new OurSyntaxWidget(syntaxHighlighting, "", fontName, fontSize, tabSize, lb, pan);
   tabBar.add(pan, tabs.size());
   tabs.add(text);
   text.listeners.add(listener); // add listener AFTER we've updated this.tabs and this.tabBar
   if (filename==null) {
      text.discard(false, getFilenames()); // forces the tab to re-derive a suitable fresh name
   } else {
      if (!text.load(filename)) return false;
      for(int i=tabs.size()-1; i>=0; i--) if (!tabs.get(i).isFile() && tabs.get(i).getText().length()==0) {
         tabs.get(i).discard(false, getFilenames()); close(i); break; // Remove the rightmost untitled empty tab
      }
   }
   select(tabs.size() - 1); // Must call this to switch to the new tab; and it will fire STATUS_CHANGE message which is important
   return true;
}
 
Example 17
Project: VASSAL-src   File: BoardSlot.java   View Source Code Vote up 4 votes
public BoardSlot(BoardPicker bp, String prompt) {
  this.prompt = prompt;
  picker = bp;
  boards = new JComboBox();
  boards.addItem(prompt);

  final String lbn[] = picker.getAllowableLocalizedBoardNames();
  for (String s : lbn) {
    boards.addItem(s);
  }
  boards.setSelectedIndex(lbn.length == 1 ? 1 : 0);
  boards.addActionListener(this);

  reverseCheckBox =
    new JCheckBox(Resources.getString("BoardPicker.flip")); //$NON-NLS-1$
  reverseCheckBox.addItemListener(new ItemListener() {
    public void itemStateChanged(ItemEvent e) {
      if (getBoard() != null) {
        getBoard().setReversed(reverseCheckBox.isSelected());
        picker.repaint();
      }
    }
  });

  reverseCheckBox.setVisible(false);

  setLayout(new OverlayLayout(this));

  final JPanel p = new JPanel();
  final Box b = Box.createHorizontalBox();
  b.add(boards);
  b.add(reverseCheckBox);
  p.add(b);
  p.setOpaque(false);
  p.setAlignmentX(0.5F);
  final JLabel l = new JLabel(this);
  l.setAlignmentX(0.5F);

  add(p);
  add(l);

  actionPerformed(null);
}
 
Example 18
Project: org.alloytools.alloy   File: OurTabbedSyntaxWidget.java   View Source Code Vote up 4 votes
/**
 * Create a new tab with the given filename (if filename==null, we'll create
 * a blank tab instead)
 * <p>
 * If a text buffer with that filename already exists, we will just switch
 * to it; else we'll read that file into a new tab.
 * 
 * @return false iff an error occurred
 */
public boolean newtab(String filename) {
	if (filename != null) {
		filename = Util.canon(filename);
		for (int i = 0; i < tabs.size(); i++)
			if (tabs.get(i).getFilename().equals(filename)) {
				if (i != me)
					select(i);
				return true;
			}
	}
	final JLabel lb = OurUtil.label("", OurUtil.getVizFont().deriveFont(Font.BOLD), Color.BLACK, Color.WHITE);
	lb.setBorder(new OurBorder(BORDER, BORDER, Color.WHITE, BORDER));
	lb.addMouseListener(new MouseAdapter() {
		@Override
		public void mousePressed(MouseEvent e) {
			for (int i = 0; i < tabs.size(); i++)
				if (tabs.get(i).obj1 == lb)
					select(i);
		}
	});
	JPanel h1 = OurUtil.makeH(4);
	h1.setBorder(new OurBorder(null, null, BORDER, null));
	JPanel h2 = OurUtil.makeH(3);
	h2.setBorder(new OurBorder(null, null, BORDER, null));
	JPanel pan = Util.onMac() ? OurUtil.makeVL(null, 2, OurUtil.makeHB(h1, lb, h2))
			: OurUtil.makeVL(null, 2, OurUtil.makeHB(h1, lb, h2, GRAY), GRAY);
	pan.setAlignmentX(0.0f);
	pan.setAlignmentY(1.0f);
	OurSyntaxWidget text = new OurSyntaxWidget(syntaxHighlighting, "", fontName, fontSize, tabSize, lb, pan);
	tabBar.add(pan, tabs.size());
	tabs.add(text);
	text.listeners.add(listener); // add listener AFTER we've updated
									// this.tabs and this.tabBar
	if (filename == null) {
		text.discard(false, getFilenames()); // forces the tab to re-derive
												// a suitable fresh name
	} else {
		if (!text.load(filename))
			return false;
		for (int i = tabs.size() - 1; i >= 0; i--)
			if (!tabs.get(i).isFile() && tabs.get(i).getText().length() == 0) {
				tabs.get(i).discard(false, getFilenames());
				close(i);
				break; // Remove the rightmost untitled empty tab
			}
	}
	select(tabs.size() - 1); // Must call this to switch to the new tab; and
								// it will fire STATUS_CHANGE message which
								// is important
	return true;
}
 
Example 19
Project: jaer   File: SpikeSoundSignalHandler.java   View Source Code Vote up 4 votes
@SuppressWarnings("rawtypes")
	protected JComponent createCustomControls() {
		myComboBox = new JComboBox();
		myComboBox.setFont(myComboBox.getFont().deriveFont(10f));
		
		ArrayList<FiringModelMap> contents;
		if (stf != null) {
			stf.getSupport().addPropertyChangeListener("firingModelMaps", this);
			contents = stf.getFiringModelMaps();
		}
		else 
			contents = new ArrayList<FiringModelMap>();
		updateComboBox(new ArrayList<FiringModelMap>(), contents);
		
		myComboBox.addActionListener(new ActionListener() {
			@Override
			public void actionPerformed(ActionEvent arg0) {
				Object newSelection = myComboBox.getSelectedItem();
				if (newSelection != currentSelection) {
					if (stf != null) {
						synchronized (stf.getFilteringLock()) {
							currentSelection = newSelection;
							if (currentSelection instanceof FiringModelMap)
								setInputMap((FiringModelMap)currentSelection);
							else 
								setInputMap(null);
						}

					}

				}
			}
		});
		
		
		getSupport().addPropertyChangeListener("inputMap",new PropertyChangeListener() {
			@Override
			public void propertyChange(PropertyChangeEvent evt) {
				if (evt.getNewValue() != evt.getOldValue()) {
					if (evt.getNewValue() != null)
						myComboBox.setSelectedItem(evt.getNewValue());
					else
						myComboBox.setSelectedIndex(0);
				}
}
		});
		JPanel customPanel = new JPanel();
        customPanel.setLayout(new BoxLayout(customPanel, BoxLayout.X_AXIS));
        customPanel.setAlignmentX(ParameterBrowserPanel.ALIGNMENT);
        final JLabel jLabel = new JLabel("Input map:");
        jLabel.setFont(jLabel.getFont().deriveFont(10f));
		customPanel.add(jLabel);
        customPanel.add(myComboBox);
        return customPanel;
	}
 
Example 20
Project: jaer   File: CochleaTow4EarControlPanel.java   View Source Code Vote up 4 votes
public CochleaTow4EarControlPanel(final CochleaTow4Ear chip) {
	super((Chip) chip);

	// Biasgen panel
	JPanel onchipBiasgenPanel = new JPanel();
	onchipBiasgenPanel.setLayout(new BoxLayout(onchipBiasgenPanel, BoxLayout.Y_AXIS));
	onchipBiasgenPanel.setAlignmentX(LEFT_ALIGNMENT);
	addTab("On-chip biases (biasgen)", (onchipBiasgenPanel));

	onchipBiasgenPanel.add(getBiasgen().biasForceEnable.makeGUIControl());
	onchipBiasgenPanel.add(new ShiftedSourceControlsCF(getBiasgen().ssBiases[0]));
	onchipBiasgenPanel.add(new ShiftedSourceControlsCF(getBiasgen().ssBiases[1]));

	biasgen.setPotArray(getBiasgen().ipots);
	onchipBiasgenPanel.add(new BiasgenPanel(getBiasgen()));
	onchipBiasgenPanel.add(getBiasgen().SelResSW.makeGUIControl());
	onchipBiasgenPanel.add(Box.createVerticalGlue()); // push up to prevent expansion of PotPanel

	// DAC
	JPanel offchipDACPanel = new JPanel();
	offchipDACPanel.setLayout(new BoxLayout(offchipDACPanel, BoxLayout.Y_AXIS));
	addTab("Off-chip biases (DAC)", (offchipDACPanel));

	offchipDACPanel.add(getBiasgen().dacRun.makeGUIControl());
	biasgen.setPotArray(getBiasgen().vpots);
	offchipDACPanel.add(new BiasgenPanel(getBiasgen()));

	// Channels L/R
	JPanel channelPanelLR = buildCochleaChannelsLRTab("Left", getBiasgen().cochleaChannels[0], "Right", getBiasgen().cochleaChannels[1]);
	addTab("Channels L/R", (channelPanelLR));

	// Channels T/B
	JPanel channelPanelTB = buildCochleaChannelsLRTab("Top", getBiasgen().cochleaChannels[2], "Bottom", getBiasgen().cochleaChannels[3]);
	addTab("Channels T/B", (channelPanelTB));

	// Scanner
	JPanel scannerPanel = new JPanel();
	scannerPanel.setLayout(new BoxLayout(scannerPanel, BoxLayout.Y_AXIS));
	addTab("Scanner Config", (scannerPanel));
	SPIConfigValue.addGUIControls(scannerPanel, getBiasgen().scannerControl);

	// AER
	JPanel aerPanel = new JPanel();
	aerPanel.setLayout(new BoxLayout(aerPanel, BoxLayout.Y_AXIS));
	addTab("AER Config", (aerPanel));
	SPIConfigValue.addGUIControls(aerPanel, getBiasgen().aerControl);

	// ADC
	JPanel adcPanel = new JPanel();
	adcPanel.setLayout(new BoxLayout(adcPanel, BoxLayout.Y_AXIS));
	addTab("ADC", (adcPanel));
	SPIConfigValue.addGUIControls(adcPanel, getBiasgen().adcControl);
	
	// Chip Config
	JPanel chipControlPanel = new JPanel();
	chipControlPanel.setAlignmentX(LEFT_ALIGNMENT);
	chipControlPanel.setLayout(new BoxLayout(chipControlPanel, BoxLayout.Y_AXIS));
	addTab("Chip Config", (chipControlPanel));
	SPIConfigValue.addGUIControls(chipControlPanel, getBiasgen().chipControl);

	setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
	setPreferredSize(new Dimension(800, 600));
	revalidate();

	setSelectedIndex(chip.getPrefs().getInt("CochleaTow4EarControlPanel.bgTabbedPaneSelectedIndex", 0));
}