문제

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

도움이 되었습니까?

해결책

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.

다른 팁

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

More information: How to create a custom Swing Component

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top