Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
41 views

Placeholder image in JViewport of JScrollPane for empty JTable

I have a JTable and want my user to drag&drop entries into that JTable. To make that as obvious as possible, I want to display a placeholder image like "Please drag stuff HERE using your ...
MrSnrub's user avatar
  • 1,163
0 votes
1 answer
34 views

How do I adjust the width of a JScrollPane based on the width of JTable Data?

My Java program has a JTable in a JScrollPane. For the table I set setAutoResizeMode(JTable.AUTO_RESIZE_OFF) and I adjust the column widths to match the data using resizeColumnWidth (shown in many ...
Rob's user avatar
  • 19
-1 votes
1 answer
48 views

JTable is only showing the first column of imported data. How do I show all columns?

I'm building a table of imported values from a csv sheet. I have 95 rows and 26 columns. I want to display all of the "dataS" values in my JTable, but I'm only getting the first column. Is ...
samcoder's user avatar
0 votes
1 answer
215 views

Swing - remove extra space from JScrollPane so that it only fits the table rows

I am a newbie to swing. I have created a table from an array list of objects. I want to know how I can remove the access white space from bellow the table- that is adjust the size of the JScrollPane ...
Jesse's user avatar
  • 15
0 votes
1 answer
187 views

How to individually set the width of a row on a table/scrollpane

i have a DefaultTableModel: DefaultTableModel model = new DefaultTableModel(data, beschriftung) { // Returning the Class of each column will allow different // ...
Thomas Hansmann's user avatar
0 votes
1 answer
75 views

How to manually align, change size, and add scroll pane of JTable?

I am creating a JTable in Netbeans and am having three minor issues with the structure. I can't seem to align my table in the direction I want (Say North, East, South, or West) and now it's ...
user avatar
0 votes
0 answers
57 views

Concurrency problem in updating Jtable/Jframes?

I will try to describe the problem as accurately as possible, since this is a legacy project from someone else that I am trying to fix (to the best of my abilities).I cannot build an accurate working ...
Pompompurin's user avatar
0 votes
0 answers
227 views

Set JScrollPane's height relative to its parent container's height [duplicate]

I have a JScrollPane containing a JTable in a GridBagLayout. When I resize my JFrame containing the layout pane, the table resizes horizontally but not vertically. Even if I have GridBagConstraints....
Luqus's user avatar
  • 119
1 vote
0 answers
77 views

Sort the JTable by JRadioButton

I want sort the JTable by the JRadioButton component's ActionListener method. When I click "name" the table will sorted out by name. But now I click name radio button, all is blank. The Main ...
jian's user avatar
  • 4,604
0 votes
0 answers
77 views

display JScrollpane horizontal scrollbar for Jtable data

I have a table with 5 columns and my last column is the working days of a teacher. the user select the days the teacher work with a checkbox, and the row is added to the Jtable when the user press the ...
Amit Amir's user avatar
0 votes
1 answer
44 views

JTable not visible inside JScrollPane

I have a JTable inside a JScrollPane. I want to show the table only when a particular button is pressed otherwise it should not be shown. Inorder to incorporate that I have set the setVisible method ...
The Warrior's user avatar
0 votes
1 answer
118 views

ScrollBar vanishes when JFrame is resized

I created a JScrollPane with a JTable on it. When the table's height is larger than the height of the scroll pane, a scroll bar appears. If minimize the JFrame although I didn't change the size of it, ...
Luqus's user avatar
  • 119
0 votes
0 answers
25 views

Trouble with adding JScrollPane to JTable initialized by TableModel

I have some troubles with adding JScrollPane to JTable in my application. There are two classes: Controller and Main form. In Main form the table is initialized as private variable, and in Controller ...
Bersh's user avatar
  • 1
0 votes
0 answers
46 views

Jtable - resizing column moves scrollbar

title is quite explanatory. i got JTable wider than screen so there is horizontal scrollbar. when i start app and try to resize column (via grabing table header) and resize it its cooperating. when i ...
abiaonrbamhta's user avatar
0 votes
1 answer
125 views

How to force repaint of JTable, JScrollPane?

I'm creating a top-down parser, that checks the syntax of a given source code according to a given grammar, then displays the result, within a simple GUI. Basically, the user selects the grammar and ...
Osama Bodiaf's user avatar

15 30 50 per page
1
2 3 4 5
22