Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3425648
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T06:37:09+00:00 2026-05-18T06:37:09+00:00

I created a jtable in gui form in intellij and I dont see any

  • 0


I created a jtable in gui form in intellij and I dont see any data.
The strangest thing is that when I am using it with out creating a form in intellij
the code works.

i used the most common example
String[] columnNames = {"First Name", "Last Name"};
Object[][] data = {{"Kathy", "Smith"},{"John", "Doe"}
and then
JTable table = new JTable(data, columnNames);
But I get no data.
Is this because of the layout manager?
any help in continue working with intellij gui and jtable?
any good jtable+gui form intellij example?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T06:37:10+00:00Added an answer on May 18, 2026 at 6:37 am

    When using IDEA GUI Designer, JTable is created for you automatically, if you have new JTable(...) in your code it overrides the table object created by IDEA and all the properties configured for the table in the Designer will be lost.

    So, you have 2 approaches here. One is to rely on IDEA to create the table and set its properties, then use table.setModel(dataModel); to provide data to your table from the dataModel.

    Second approach is to create the table dynamically from your code and then add this table into the existing JScrollPane or other panel on the form via scrollPane.setViewportView(myTable);.

    IDEA also has more advanced approach called Custom Create. If you enable this checkbox for the JTable on the form, IDEA adds createUIComponents() method to the bound class where you create this component manually like ... = new JTable(...).

    You can download the complete sample project and experiment with different approaches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any good books or website that go over creating a JTable ?
I have a JTable that is populated using a custom TableModel I created. I
I have created one jTable. I want to display the data into table from
I have a JTable which is created using a TableModel JTable t = new
I created a GUI class that displays a list of items. When the user
First, let me point out that I'm new to programming Java Desktop GUI's. I
I have created a simple GUI which includes a JTable. This table may be
I created a function which loads data into a JTable . Everything's working fine
When a JTable component is created, cell editing is enabled by default. How can
I'm trying to create a jTable that, once a button is clicked, adds rows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.