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

  • Home
  • SEARCH
  • 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 8707767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T03:57:07+00:00 2026-06-13T03:57:07+00:00

I have problem with display of table. My table initially has rows. But next

  • 0

I have problem with display of table. My table initially has rows. But next time if I do some operation my table list becomes empty. So when I add that model to the table the table is empty. It is empty but the display is showing white colour in table area.

Initially the table looks like below figure.

First Table

Then I need to call some action and if that action returns an empty list then I am creating a new
Jtable with that list and placing it on the panel. But it is looking like the following.

Empty Table

Following is the approach which I am follwoing to do this,

pnlRight.removeAll();
//pnlRight.invalidate();
// pnlRight.revalidate();
// pnlRight.repaint();
pnlRight.add(new JScrollPane(table), BorderLayout.CENTER);
pnlRight.invalidate();
pnlRight.validate();
pnlRight.repaint();

I have read one of the post on this @kdgregory, after removing I should call the above methods. this weird thing is happening. If I call only repaint() then even the column names are missing from the panel (Ideally this should not happen in this case.) Please explain what is the problem with this.

  • 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-06-13T03:57:08+00:00Added an answer on June 13, 2026 at 3:57 am
    • not I think there isn’t (logical) reason for that, to remove a JTable (with JScrollPane) and put there another JTable

    • create JTable and to store all data to XxxTableModel,

    • reset XxxTableModel and then to load another data in different structure

    • use CardLayout for switching betweens views

    EDIT

    • following code

    pnlRight.revalidate();

    pnlRight.repaint();

    there no caused any issue, problem isn’t in this code….

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

Sidebar

Related Questions

I have a table with some of the rows starting off hidden ( display:none
So, here's the skinny... I have a page that has a list as display:table-cell
I have ... <table> <tbody> <tr style=display: none; class=print_display><td>stuff ....</td>/tr> </tbody> </table> problem is
I have a problem using the display: table features of CSS. I am getting
I have this mysql tables I want to display with jqgrid. The problem appears
I have this problem having to display my jasper report on my grails application.
I have a problem with the display of my popover. After initWithContentViewController: and presentPopoverFromBarButtonItem:permittedArrowDirections:animated:
I have a problem with li , when I take li in inline display
i have a problem with VIMEO video . I want to display it in
I have an strange problem using two borders. I use them to display video

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.