I want to hide or delete the Jtable from the frame

Use removeAll() and updateUI()???

@ Taywin, again JTable :-),

<withOutFW> updateUI() == that's nothing to do with JTable, please don't updateUI, don't do that, never, forgot that that exist something as updateUI, right now, its road to the hell (on 1st.exceptions you ends with NPE or RepaintManager)<withOutFW> :-)

near to repaint reality - SwingUtilities.updateComponentTreeUI(topLayOutContainer);

@ bharath54321

1/ hide
myTable.setVisible(false)

2/ remove JComponents from Container
containerName.remove(myTable)
containerName.revalidte();
containerName.repaint();

3/ hard to give you correct answer, because you **** about some forum rules, sure without see your code,

then my answers are (and will be too) only shots to the dark

Thanks - mKorbel

When using autocomplete, I noticed there used to be a hide() method. After clicking on that, it was struck out with a mention that it has been replaced by the setVisible(boolean) method.

This works fine :)

  • Wayne Riesterer

indeed it does, but do you consider that a valid reason to revive a dead thread, just to repeat that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.