Michael Dunn wrote:weirdest bit of code I've seen for a while
in the middle of a class that extends JDialog, you're creating multiple JFrames?
in the method (that you think is a class), you add the table/scrollpane to the extended JDialog,
but try to set that as a JFrame's contentPane.
Jason Guyton wrote:Problem 1: The table is displayed very small. All the data in the cells is truncated, showing only a few characters of the player's names. I can resize the window and all the columns expand equally, but i have to make it about 3 times the original width to see the names well enough.
Also, there is gray space below the table that double the height of the window. How can I size the window to my liking?
Problem2: The table displays an initial state of the data in the arraylist, which is mostly empty strings. As the popups for selecting players come and go, the table does not update. I tried the public void fireTableDataChanged() in the table model, but it didn't work.
Jason Guyton wrote:I'm trying to add in some of your suggestions.
1 - Not sure what you mean by switch statement.
3 - On the TableColumnModel for setting column size, do I have to create another inner class for TableColumnModel to do that?
4 - Setting window size did not seem to have any effect. I was doing this to the contentPane object.
5 - The set of teams is fixed at 10. there is no adding of columns or rows. The only the values in the cells are changed by the draft algorithm. A roster slot is changed from " " to "Drew Brees" for example. The table will fill in all the new info as soon as I manually resize it, but it doesn't do anything when the picks are happening.
We find this kind of rampant individuality very disturbing. But not this tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Javahttps://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire