
import java.awt.BorderLayout;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTree;
import javax.swing.SwingConstants;
import javax.swing.JSeparator;
import javax.swing.JTextField;

// https://www.google.fr/search?q=java+jtree+add+node&source=lnms&sa=X&ved=0ahUKEwjp77yxmuTfAhVGJBoKHV7xA0UQ_AUICSgA&biw=1280&bih=697&dpr=1.5

// https://www.youtube.com/watch?v=rhRcxwreeVc

// http://1bestcsharp.blogspot.com/2017/08/java-add-node-to-jtree.html

// https://www.codejava.net/java-se/swing/jtree-basic-tutorial-and-examples

public class Jtree01 extends JDialog 
{
	private JTextField textField;

	
	public Jtree01() 
	{
		setBounds(100, 100, 699, 446);
		getContentPane().setLayout(null);
		{
			JButton button = new JButton("OK");
			button.setBounds(191, 374, 89, 23);
			getContentPane().add(button);
		}
		{
			JButton button = new JButton("Cancel");
			button.setBounds(415, 374, 89, 23);
			getContentPane().add(button);
		}
		
		JSeparator separator = new JSeparator();
		separator.setBounds(57, 345, 549, 2);
		getContentPane().add(separator);
		{
			JTree tree = new JTree();
			tree.setBounds(29, 22, 232, 282);
			getContentPane().add(tree);
		}
		{
			textField = new JTextField();
			textField.setBounds(383, 79, 86, 20);
			getContentPane().add(textField);
			textField.setColumns(10);
		}
		{
			JButton btnNewButton = new JButton("New button");
			btnNewButton.setBounds(380, 144, 89, 23);
			getContentPane().add(btnNewButton);
		}
	}
}
