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

The following are Jave code examples for showing how to use setPreferredSize() 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: json2java4idea   File: SettingsPanel.java   View Source Code Vote up 7 votes
private void createUIComponents() {
    final EditorFactory editorFactory = EditorFactory.getInstance();
    previewDocument = editorFactory.createDocument(EMPTY_TEXT);
    previewEditor = editorFactory.createEditor(previewDocument, null, JavaFileType.INSTANCE, true);

    final EditorSettings settings = previewEditor.getSettings();
    settings.setWhitespacesShown(true);
    settings.setLineMarkerAreaShown(false);
    settings.setIndentGuidesShown(false);
    settings.setLineNumbersShown(false);
    settings.setFoldingOutlineShown(false);
    settings.setRightMarginShown(false);
    settings.setVirtualSpace(false);
    settings.setWheelFontChangeEnabled(false);
    settings.setUseSoftWraps(false);
    settings.setAdditionalColumnsCount(0);
    settings.setAdditionalLinesCount(1);

    previewPanel = (JPanel) previewEditor.getComponent();
    previewPanel.setName(PREVIEW_PANEL_NAME);
    previewPanel.setPreferredSize(new Dimension(PREFERRED_PREVIEW_WIDTH, PREFERRED_PREVIEW_HEIGHT));
}
 
Example 2
Project: Cognizant-Intelligent-Test-Scripter   File: ImageGallery.java   View Source Code Vote up 6 votes
/**
 * set up the thumb image UI
 *
 * @param f
 * @return
 */
JPanel getPanel(final String f) {
    setThumbImage(f);
    JPanel p = new JPanel() {
        @Override
        public void paintComponent(Graphics g) {
            g.drawImage(thumbs.get(f), 0, 0, null);
        }
    };
    p.setPreferredSize(THUMB_SIZE);
    p.setBorder(new LineBorder(Color.LIGHT_GRAY, 3));
    JComponent c = getThumbSelector(f);
    JComponent cl = setupThumbClose(p);
    setupAlignment(p, c, cl);
    p.setName(f);
    p.addMouseListener(thumbselected);
    p.addMouseListener(Listeners.thumbPrevFocus);
    thumbList.add(p);
    return p;
}
 
Example 3
Project: org.alloytools.alloy   File: SwingLogPanel.java   View Source Code Vote up 6 votes
/** Write a horizontal separator into the log window. */
public void logDivider() {
	if (log == null)
		return;
	clearError();
	StyledDocument doc = log.getStyledDocument();
	Style dividerStyle = doc.addStyle("bar", styleRegular);
	JPanel jpanel = new JPanel();
	jpanel.setBackground(Color.LIGHT_GRAY);
	jpanel.setPreferredSize(new Dimension(300, 1)); // 300 is arbitrary,
													// since it will
													// auto-stretch
	StyleConstants.setComponent(dividerStyle, jpanel);
	reallyLog(".", dividerStyle); // Any character would do; "." will be
									// replaced by the JPanel
	reallyLog("\n\n", styleRegular);
	log.setCaretPosition(doc.getLength());
	lastSize = doc.getLength();
}
 
Example 4
Project: FreeCol   File: StatisticsPanel.java   View Source Code Vote up 6 votes
private JPanel createStatsTable(String title, Map<String, String> data) {
    JPanel panel = new JPanel();
    panel.setLayout(new BorderLayout());
    panel.add(new JLabel(title), BorderLayout.PAGE_START);
    StatisticsModel model = new StatisticsModel();
    model.setData(data);
    JTable table = new JTable(model);
    table.setAutoCreateColumnsFromModel(true);
    table.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS);
    table.setAutoCreateRowSorter(true);
    JScrollPane scrollPane = new JScrollPane(table);
    table.addNotify();
    scrollPane.getViewport().setOpaque(false);
    scrollPane.getColumnHeader().setOpaque(false);
    panel.add(scrollPane, BorderLayout.CENTER);
    panel.setPreferredSize(new Dimension(300, (data.size()+2)*17));
    return panel;
}
 
Example 5
Project: openjdk-jdk10   File: ViewportOverlapping.java   View Source Code Vote up 6 votes
protected void prepareControls() {
    p = new JPanel(new GridLayout(0, 1));
    propagateAWTControls(p);
    b = new JButton("Space extender");
    p.add(b);
    p.setPreferredSize(new Dimension(500, 500));
    scrollPane = new JScrollPane(p);

    f = new JFrame();
    f.addMouseListener(new MouseAdapter() {

        @Override
        public void mouseClicked(MouseEvent e) {
            frameClicked++;
        }
    });
    f.getContentPane().add(scrollPane, BorderLayout.CENTER);
    ((JComponent) f.getContentPane()).setBorder(
            BorderFactory.createEmptyBorder(50, 50, 50, 50));
    f.setSize(400, 400);
    f.setLocationRelativeTo(null);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setVisible(true);
}
 
Example 6
Project: incubator-netbeans   File: ResourceWizardPanel.java   View Source Code Vote up 6 votes
/** Gets component to display. Implements superclass abstract method. 
 * @return this instance */
protected Component createComponent() {
    JPanel panel = new JPanel(new CardLayout());

    // Accessibility
    panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(ResourceWizardPanel.class).getString("ACS_ResourceWizardPanel"));                 
    
    panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(1));

    String msgKey = testWizard ? "TXT_SelectTestResource"       //NOI18N
                               : "TXT_SelectResource";          //NOI18N
    panel.setName(NbBundle.getMessage(ResourceWizardPanel.class, msgKey));
    panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);
    
    panel.add(getUI(), CARD_GUI);

    return panel;
}
 
Example 7
Project: incubator-netbeans   File: AdditionalWizardPanel.java   View Source Code Vote up 6 votes
/** Gets component to display. Implements superclass abstract method. 
 * @return <code>AdditionalPanel</code> instance */
protected Component createComponent() {
    JPanel panel = new JPanel();
    
    //Accessibility
    panel.getAccessibleContext().setAccessibleDescription(NbBundle.getBundle(AdditionalWizardPanel.class).getString("ACS_AdditionalWizardPanel"));                    
    
    panel.putClientProperty(WizardDescriptor.PROP_CONTENT_SELECTED_INDEX, Integer.valueOf(2));
    panel.setName(NbBundle.getBundle(getClass()).getString("TXT_ModifyAdditional"));
    panel.setPreferredSize(I18nWizardDescriptor.PREFERRED_DIMENSION);

    panel.setLayout(new GridBagLayout());
    GridBagConstraints constraints = new GridBagConstraints();
    constraints.weightx = 1.0;
    constraints.weighty = 1.0;
    constraints.fill = GridBagConstraints.BOTH;
    panel.add(getUI(), constraints);
    
    return panel;
}
 
Example 8
Project: QN-ACTR-Release   File: MMQueues.java   View Source Code Vote up 5 votes
private JPanel getSplitter(int widht, int height) {
	JPanel splitPane = new JPanel();
	Dimension dim = new Dimension(widht, height);
	splitPane.setEnabled(false);
	splitPane.setPreferredSize(dim);
	splitPane.setMaximumSize(dim);
	splitPane.setMinimumSize(dim);
	return splitPane;
}
 
Example 9
Project: SE2Project   File: RueckgabeUI.java   View Source Code Vote up 5 votes
/**
 * Erzeugt das Hauptpanel, in dem sich Verleihkartenauflister,
 * Verleihkartenanzeiger und Rücknahme-Button befinden.
 */
private void erzeugeHauptPanel()
{
    _hauptPanel = new JPanel();
    _hauptPanel.setLayout(new BorderLayout());
    _hauptPanel.setPreferredSize(new java.awt.Dimension(-1, -1));
    _hauptPanel.setSize(-1, -1);
    _hauptPanel.setAutoscrolls(true);
    _hauptPanel.setBackground(UIConstants.BACKGROUND_COLOR);
}
 
Example 10
Project: jmt   File: EmptyPanel.java   View Source Code Vote up 5 votes
public void initialize() {
	JPanel empty = new JPanel();
	empty.setPreferredSize(new Dimension(CommonConstants.MAX_GUI_WIDTH_COMMON, CommonConstants.MAX_GUI_HEIGHT_COMMON));
	this.setLayout(new BorderLayout());
	this.add(empty, BorderLayout.CENTER);
	title.setTitleColor(Color.LIGHT_GRAY);
	this.setBorder(title);
}
 
Example 11
Project: MailCopier   File: Main.java   View Source Code Vote up 5 votes
private JPanel get_Panel() {
    JPanel panel = new Wallpaper_Panel(new GridBagLayout());
    panel.setPreferredSize(new Dimension(340,290));
    
    GridBagConstraints c = new GridBagConstraints();
    c.fill = GridBagConstraints.BOTH;
    c.weightx = 1;
    c.weighty = 1;
    
    c.gridy = 0; c.gridx = 0;
    JPanel topGab = new JPanel();
    topGab.setOpaque(false);
    panel.add(topGab, c);

    c.insets = new Insets(0, 0, 10, 0);//top, left, bott, right
    c.gridx = 1;
    
    c.gridy = 1;
    panel.add(get_send_butt(), c);
    c.gridy = 2;c.gridwidth = 1; 
    panel.add(get_receive_butt(), c);
    c.gridy = 3;
    panel.add(get_settings_butt(), c);

    c.insets = new Insets(0, 0, 0, 0); // reset to default
    
    c.gridy = 4;
    panel.add(get_help_butt(), c);

    c.gridx = 2;
    
    c.gridy = 5; 
    JPanel bottGab = new JPanel();
    bottGab.setOpaque(false);
    panel.add(bottGab, c);
    
    return panel;
}
 
Example 12
Project: DocIT   File: CompanyServices.java   View Source Code Vote up 5 votes
/**
 * Visualize company graph
 */
public void visualizeGraph(String s) {
	try {
		final File png = new File(s);
		png.deleteOnExit();
		Tg2Dot.convertGraph(graph, png.getCanonicalPath(),
				GraphVizOutputFormat.PNG);
		final Image i = ImageIO.read(png);
		JPanel panel = new JPanel() {
			private static final long serialVersionUID = -891941166683362373L;

			@Override
			public void paintComponent(Graphics g) {
				g.drawImage(i, 0, 0, null);
			}
		};
		panel.setPreferredSize(new Dimension(i.getWidth(panel), i
				.getHeight(panel)));
		panel.setVisible(true);
		JFrame f = new JFrame("Company Graph");
		f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
		JScrollPane sp = new JScrollPane(panel);
		f.getContentPane().add(sp);
		f.setSize(400, 400);
		f.setVisible(true);
	} catch (IOException e) {
		e.printStackTrace();
	}
}
 
Example 13
Project: jmt   File: AboutDialogPanel.java   View Source Code Vote up 5 votes
/**
 * Initialize the panel
 */
private void initialize() {
	// Initialize dialog layout
	
	JPanel panel = new JPanel(new BorderLayout(BORDERSIZE / 2, BORDERSIZE / 2));
	panel.setBorder(BorderFactory.createEmptyBorder(BORDERSIZE, BORDERSIZE, BORDERSIZE, BORDERSIZE));
	// Adds website image
	JPanel tmpPanel = new JPanel(new BorderLayout(BORDERSIZE, BORDERSIZE));
	// Adds polimi description
	HtmlPanel titleLabel = new HtmlPanel();
	titleLabel.setText(GraphStartScreen.HTML_CONTENT_TITLE_HREF);
	titleLabel.setAlignmentX(Component.CENTER_ALIGNMENT);
	titleLabel.setAlignmentY(Component.CENTER_ALIGNMENT);
	titleLabel.setOpaque(false);
	tmpPanel.add(titleLabel, BorderLayout.CENTER);

	// Adds application title
	title = new JLabel();
	title.setHorizontalTextPosition(SwingConstants.RIGHT);
	title.setHorizontalAlignment(SwingConstants.CENTER);
	title.setIconTextGap(BORDERSIZE);
	tmpPanel.add(title, BorderLayout.SOUTH);

	panel.add(tmpPanel, BorderLayout.NORTH);

	// Adds text area
	mainArea = new JPanel();
	mainArea.setOpaque(false);
	BoxLayout mainLayout = new BoxLayout(mainArea, BoxLayout.Y_AXIS);
	mainArea.setLayout(mainLayout);
	
	panel.add(mainArea, BorderLayout.CENTER);

	JLabel legal = new JLabel(LEGAL);
	panel.add(legal, BorderLayout.SOUTH);
	panel.setPreferredSize(new Dimension(600,480));
	JScrollPane scroll = new JScrollPane(panel, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
	this.add(scroll, BorderLayout.CENTER);
}
 
Example 14
Project: Equella   File: WizardFrame.java   View Source Code Vote up 4 votes
private void setup()
{
	header = Icons.getHeader(export);
	footer = new Footer();

	content = new JPanel(new GridLayout(1, 1));

	next = new JButton();
	back = new JButton("< Back");

	next.addActionListener(this);
	back.addActionListener(this);

	JPanel buttons = new JPanel(new FlowLayout(FlowLayout.RIGHT));
	buttons.add(back);
	buttons.add(next);

	buttons.setPreferredSize(buttons.getPreferredSize());

	final int width = header.getPreferredSize().width;
	final int height1 = header.getPreferredSize().height;
	final int height2 = buttons.getPreferredSize().height;
	final int height3 = footer.getPreferredSize().height;

	final int[] rows = new int[]{height1, 300, height2, height3};
	final int[] cols = new int[]{width};

	JPanel all = new JPanel(new TableLayout(rows, cols, 5, 5));
	all.add(header, new Rectangle(0, 0, 1, 1));
	all.add(content, new Rectangle(0, 1, 1, 1));
	all.add(buttons, new Rectangle(0, 2, 1, 1));
	all.add(footer, new Rectangle(0, 3, 1, 1));

	getContentPane().add(all);

	pack();
	setResizable(false);
	setTitle(title);
	ComponentHelper.centreOnScreen(this);
	setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

	updateButtons();
}
 
Example 15
Project: Logisim   File: MouseOptions.java   View Source Code Vote up 4 votes
public MouseOptions(OptionsFrame window) {
	super(window, new GridLayout(1, 3));

	explorer = new ProjectExplorer(getProject());
	explorer.setListener(listener);

	// Area for adding mappings
	addArea.addMouseListener(listener);

	// Area for viewing current mappings
	model = new MappingsModel();
	mappings.setTableHeader(null);
	mappings.setModel(model);
	mappings.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
	mappings.getSelectionModel().addListSelectionListener(listener);
	mappings.clearSelection();
	JScrollPane mapPane = new JScrollPane(mappings);

	// Button for removing current mapping
	JPanel removeArea = new JPanel();
	remove.addActionListener(listener);
	remove.setEnabled(false);
	removeArea.add(remove);

	// Area for viewing/changing attributes
	attrTable = new AttrTable(getOptionsFrame());

	GridBagLayout gridbag = new GridBagLayout();
	GridBagConstraints gbc = new GridBagConstraints();
	setLayout(gridbag);
	gbc.weightx = 1.0;
	gbc.weighty = 1.0;
	gbc.gridheight = 4;
	gbc.fill = GridBagConstraints.BOTH;
	JScrollPane explorerPane = new JScrollPane(explorer, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,
			ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
	gridbag.setConstraints(explorerPane, gbc);
	add(explorerPane);
	gbc.weightx = 0.0;
	JPanel gap = new JPanel();
	gap.setPreferredSize(new Dimension(10, 10));
	gridbag.setConstraints(gap, gbc);
	add(gap);
	gbc.weightx = 1.0;
	gbc.gridheight = 1;
	gbc.gridx = 2;
	gbc.gridy = GridBagConstraints.RELATIVE;
	gbc.weighty = 0.0;
	gridbag.setConstraints(addArea, gbc);
	add(addArea);
	gbc.weighty = 1.0;
	gridbag.setConstraints(mapPane, gbc);
	add(mapPane);
	gbc.weighty = 0.0;
	gridbag.setConstraints(removeArea, gbc);
	add(removeArea);
	gbc.weighty = 1.0;
	gridbag.setConstraints(attrTable, gbc);
	add(attrTable);

	getOptions().getMouseMappings().addMouseMappingsListener(listener);
	setCurrentTool(null);
}
 
Example 16
Project: incubator-netbeans   File: CheckRenderer.java   View Source Code Vote up 4 votes
/** The component returned by HtmlRenderer.Renderer.getTreeCellRendererComponent() */


    public Component getTreeCellRendererComponent(JTree tree, Object value,
    boolean isSelected, boolean expanded, boolean leaf, int row, boolean hasFocus) {

        JPanel panel = new JPanel();
        panel.setLayout(new BorderLayout());
        panel.setOpaque(true);

        Node n = Visualizer.findNode(value);
        ElementNode.Description description = n.getLookup().lookup(ElementNode.Description.class);

        if ( description != null ) {
            check.setVisible( description.isSelectable() || description.hasSelectableSubs() );
            if( description.isSelectable() ) {
                check.setSelected(description.isSelected());
            } else {
                check.setState( getCheckState( description.getSubs() ));
            }
        }

        if ( isSelected ) {
            label.setForeground(LIST_FOR_COLORS.getSelectionForeground());
            panel.setOpaque(true);
            panel.setBackground(LIST_FOR_COLORS.getSelectionBackground());
        }
        else {
            label.setForeground(tree.getForeground());
            panel.setOpaque(false);
            //setBackground(tree.getBackground());
        }

        label.setText( n.getHtmlDisplayName() );
        label.setIcon( new ImageIcon( n.getIcon(BeanInfo.ICON_COLOR_16x16) ) ); // XXX Ask description directly

        panel.add(check, BorderLayout.WEST );
        panel.add(label, BorderLayout.CENTER );

        panel.setPreferredSize(new Dimension(label.getPreferredSize().width + check.getPreferredSize().width, panel.getPreferredSize().height));
        return panel;
    }
 
Example 17
Project: QN-ACTR-Release   File: MainWindow.java   View Source Code Vote up 4 votes
/** Creates the new Main window of the application.
 *
 */
public MainWindow() {
  
	super(true);
	
  
	this.setIconImage(JMTImageLoader.loadImage("JMODELIcon").getImage());
	setTitle(TITLE);
	mediator = new Mediator(null, this);
	Mediator.advanced = advanced;

	//menu = new Menu(mediator);
	menu = mediator.createMenu();
	setJMenuBar(menu);

	toolbar = mediator.createToolbar();
	getContentPane().setLayout(new MultiBorderLayout());
	getContentPane().add(toolbar, BorderLayout.NORTH);
	getContentPane().add(mediator.getComponentBar(), BorderLayout.NORTH);
	mainPane = new JPanel(new BorderLayout());
	getContentPane().add(mainPane, BorderLayout.CENTER);

	ml = new GraphMouseListner(mediator);
	mediator.setMouseListner(ml);

	scroll = new JScrollPane();
	mainPane.add(scroll, BorderLayout.CENTER);
	centerWindow(800, 600);
	
	//QN-Java
	statusPanel = new JPanel();
	statusPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));
	this.add(statusPanel, BorderLayout.SOUTH);
	statusPanel.setPreferredSize(new Dimension(this.getWidth(), 20));
	statusPanel.setLayout(new BoxLayout(statusPanel, BoxLayout.X_AXIS));
	statusLabel = new JLabel("Clock (s): ");
	statusLabel.setHorizontalAlignment(SwingConstants.LEFT);
	statusPanel.add(statusLabel);
	//statusLabel.setText("setText"); // use such codes to change lable text
	GlobalUtilities.mainWin = this;
	
	setVisible(true);
	
  //JOptionPane.showMessageDialog(null, "MainWindow()", "MainWindow.java", JOptionPane.INFORMATION_MESSAGE); // CAO

	//QN-Java test
	//TestGUI.createAndShowGUI();
	if(QnactrSimulation.entitiesViewerEnable)QnactrSimulation.createAndShowEntitiesViewerGUI();
	if(QnactrSimulation.taskVisualization2DEnable)QnactrSimulation.createAndShowTaskVisualization2DViewerGUI();
	if(QnactrSimulation.taskVisualization3DEnable)QnactrSimulation.createAndShowTaskVisualization3DViewerGUI();
	
	// added by Yelly, 
	// to skip all selection steps to simplify tests
	mediator.openModel_simple_test();
	mediator.startSimulation();
}
 
Example 18
Project: FreeCol   File: FatherDetailPanel.java   View Source Code Vote up 4 votes
/**
 * Builds the details panel for the given FoundingFather.
 *
 * @param father a FoundingFather
 * @param panel the detail panel to build
 */
public void buildDetail(FoundingFather father, JPanel panel) {
    panel.setLayout(new MigLayout("wrap 2, fillx, gapx 20", "", ""));

    String name = Messages.getName(father);
    String type = Messages.message(father.getTypeKey());
    String text = name + " (" + type + ")";
    JLabel header = new JLabel(text);
    header.setFont(FontLibrary.createCompatibleFont(text,
        FontLibrary.FontType.HEADER, FontLibrary.FontSize.SMALL));

    Image image = ImageLibrary.getFoundingFatherImage(father, false);
    JLabel label = new JLabel(new ImageIcon(image));

    StringTemplate template = StringTemplate.label("")
        .add(Messages.descriptionKey(father))
        .addName("\n\n[")
        .add(father.getId() + ".birthAndDeath")
        .addName("] ")
        .add(father.getId() + ".text");
    final Turn turn = getMyPlayer().getElectionTurns().get(name);
    if (turn != null) {
        template
            .addName("\n\n")
            .add("report.continentalCongress.elected")
            .addName(" ")
            .addStringTemplate(turn.getLabel());
    }

    panel.add(header, "span, align center, wrap 40");
    panel.add(label, "top");
    JTextArea description = Utility.localizedTextArea(template, 20);
    panel.add(description, "top, growx");

    Dimension hSize = header.getPreferredSize(),
        lSize = label.getPreferredSize(),
        dSize = description.getPreferredSize(), size = new Dimension();
    size.setSize(lSize.getWidth() + dSize.getWidth() + 20,
        hSize.getHeight() + lSize.getHeight() + 10);
    panel.setPreferredSize(size);            
}
 
Example 19
Project: PointOfSale   File: CheckoutFrame.java   View Source Code Vote up 4 votes
public void addNumpad(Panel panel, JTextField input)
	{
		JPanel numPnl = new JPanel(new GridLayout(4,3));
		JPanel zeroPnl = new JPanel(new BorderLayout());
		
		for(int i = 1; i < 13; i++){
			
			JButton numBtn = new JButton();


			if(i == 10){
				numBtn.setText(String.valueOf("0"));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));
			}
			else if (i == 11) {
				numBtn.setText(String.valueOf("."));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));
			}
			else if (i == 12) {
				numBtn.setText(String.valueOf("clr"));
				numBtn.addActionListener(e -> RetailHelper.setTextField(input, ""));
			}
			else {
				numBtn.setText(String.valueOf(i));
				numBtn.addActionListener(e -> RetailHelper.addToTextField(input, numBtn.getText()));				
			}
			numPnl.add(numBtn);
				
//				JButton zeroBtn = new JButton();
//				zeroBtn.setText("0");
//				zeroBtn.addActionListener(e -> input.setText(input.getText()+ "" + zeroBtn.getText()));
//				zeroPnl.add(zeroBtn, BorderLayout.CENTER);
//				barcodePnl.add(b, BorderLayout.SOUTH);
//			}
		}
		JPanel eastNumPnl = new JPanel();
		eastNumPnl.setLayout(new BoxLayout(eastNumPnl, BoxLayout.PAGE_AXIS));

		Dimension size = new Dimension(100, 100);
		zeroPnl.setPreferredSize(size);
		zeroPnl.setSize(size);
		zeroPnl.setMaximumSize(size);

		
		panel.add(numPnl, BorderLayout.SOUTH);
		//panel.add(zeroPnl, BorderLayout.SOUTH);
	}
 
Example 20
Project: incubator-netbeans   File: TestCreatorConfiguration.java   View Source Code Vote up 2 votes
/**
 * Finds the configuration panel that should be presented in the test creator dialog.
 * Default implementation just returns an empty panel
 * 
 * @return the configuration panel
 */
public Component getConfigurationPanel(Context context) {
    JPanel codeGenPanel = new JPanel();
    codeGenPanel.setPreferredSize(new Dimension(447, 344));
    return codeGenPanel;
}