UI layout similar to NetBeans or Eclipse IDE

Hello All,

I need to develop a UI whose basic layout should be similar that of the popular IDEs like Netbeans or Eclipse. Basically it should look as described below:

- A Menu bar

- Under that a toolbar

- Under that a left section and a right section

- Under that a bottom section

All these sections should be arbitrarily resizable and movable by drag and drop.

May I know if the netbeans IDE is developed using java swing? Do we require any other components to develop this kind of a UI? Is there any sample source code available?

Any help would be highly appreciated with duke dollars :-)

Thanks in advance,

Sandeep

[684 byte] By [sandeepjosepha] at [2007-11-27 9:51:15]
# 1
Hi,NetBeans is build on Swing. You could build on the NetBeans Platform, if you want to reuse their components: http://www.netbeans.org/products/platform/-Puce
Pucea at 2007-7-13 0:20:21 > top of Java-index,Desktop,Core GUI APIs...
# 2

Thank you so much Puce :-). I have awarded you 5 duke stars.

I found that the Eclipse SWT + JFace is also very good to build powerful RCP applications. However I like the NetBeans platform better, so I'll try with that.

One advantage of Eclipse is, it seems to be more popular with so many turorials and articles.

If you have any good tutorials for NetBeans platform, I would appreciate if you wouls share them.

Thanks,

Sandeep

sandeepjosepha at 2007-7-13 0:20:21 > top of Java-index,Desktop,Core GUI APIs...
# 3
Hey, I just realized that I have a silver star now! ;-)Have a look at the NetBeans Platform site for tutorials. Eg.: http://platform.netbeans.org/tutorials/index.html-Puce
Pucea at 2007-7-13 0:20:21 > top of Java-index,Desktop,Core GUI APIs...
# 4
Check this tutorial to get startet: http://platform.netbeans.org/tutorials/nbm-paintapp.html#setup
Andre_Uhresa at 2007-7-13 0:20:21 > top of Java-index,Desktop,Core GUI APIs...
# 5

A basic demo:import java.awt.*;

import java.awt.event.*;

import java.util.*;

import javax.swing.*;

import javax.swing.event.*;

public class SplitPaneDemo extends JFrame

{

public SplitPaneDemo()

{

super("SplitPane Demo");

setDefaultCloseOperation(EXIT_ON_CLOSE);

JPanel leftPanel = new JPanel();

leftPanel.add(new JLabel("Project Navigation goes here"));

JPanel rightPanel = new JPanel();

rightPanel.add(new JLabel("Code would typically be on this side"));

JPanel bottomPanel = new JPanel();

bottomPanel.add(new JLabel("Console/Errors etc. would go typically be on the bottom"));

JSplitPane split1 = new JSplitPane();

split1.setOrientation(JSplitPane.HORIZONTAL_SPLIT);

split1.setDividerLocation(200);

split1.setLeftComponent(new JScrollPane(leftPanel));

split1.setRightComponent(new JScrollPane(rightPanel));

JSplitPane split2 = new JSplitPane();

split2.setOrientation(JSplitPane.VERTICAL_SPLIT);

split2.setDividerLocation(200);

split2.setLeftComponent(split1);

split2.setRightComponent(new JScrollPane(bottomPanel));

JToolBar toolbar = new JToolBar();

toolbar.add(new JButton("OPEN"));

toolbar.add(new JButton("SAVE"));

toolbar.add(new JButton("PRINT"));

JMenu fileMenu = new JMenu("File");

fileMenu.add(new JMenuItem("Print"));

fileMenu.add(new JMenuItem("Save"));

fileMenu.add(new JMenuItem("Close"));

JMenu editMenu = new JMenu("Edit");

editMenu.add(new JMenuItem("Cut"));

editMenu.add(new JMenuItem("Copy"));

editMenu.add(new JMenuItem("Paste"));

JMenuBar menuBar = new JMenuBar();

menuBar.add(fileMenu);

menuBar.add(editMenu);

setJMenuBar(menuBar);

Container c = getContentPane();

c.setLayout(new BorderLayout());

c.add(toolbar, BorderLayout.NORTH);

c.add(split2, BorderLayout.CENTER);

setSize(600,400);

}

public static void main(String[] args)

{

JFrame f = new SplitPaneDemo();

f.setVisible(true);

}

}

KelVarnsona at 2007-7-13 0:20:21 > top of Java-index,Desktop,Core GUI APIs...