0

I want to make a user interface in Java for database modeling, like the image below.

I have made tables but they are not re-sizeable, they only show column using JTable and JFrame. Am I doing right or there any better way to do this?

enter image description here

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
user1686357
  • 11
  • 1
  • 1
  • 3

2 Answers2

1

It appears that you can nest Swing components inside of a JPanel to create your database table component.

JPanel
    JLabel
    JScrollPane
        JTree
    JScrollPane
        JList

This may or may not be easier than creating a custom Swing component.

You will definitely want to create a GUI model that combines the DefaultMutableTreeNodes of the JTree and the DefaultListModel of the JList.

Gilbert Le Blanc
  • 50,182
  • 6
  • 67
  • 111
-1

You need to make Swing custom component - it's a lot of work.

More information: How to create a custom Swing Component

Community
  • 1
  • 1
Peter Penzov
  • 1,126
  • 134
  • 430
  • 808