I'm trying to create a table where the first row contains 1 button, and the other rows contain multiple columns. Example picture:
How could I make this?
I've attempted the following: add button to table but that only allows you to add a button like this:
I've looked at other stackOverflow posts, but those answers contain dead links, which are no help to me.
This is relatively easy by placing the button outside the table. Here is how to go about it:
Create a panel with a BorderLayout
. Add the table (to a scroll pane) to the CENTER
of the border layout. Add the button to the PAGE_START
of the border layout. Job done.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.