All Questions
6 questions
0
votes
1
answer
108
views
How to get Jlist with JScrollpane list to show on a JFrame? isn't appear
I'm working on a school assignment with a GUI application dealing with a bookstorage system, the application should display a list of the book in bookstorage but when I launch it nothing shows. Below ...
1
vote
0
answers
20
views
jlist listModel arrayOutOfBounds at 20 items [duplicate]
I have a DefautListModel which reads file names from a directory. Whenever I have more than 19 files I get:
java.lang.ArrayIndexOutOfBoundsException: Index 20 out of bounds for length 20
I tried ...
0
votes
1
answer
2k
views
Trying to remove a Element from a DefaultListModel object
using java version 9
I have some test code to remove a item from a list created by passing a refrence to by DefaultListModel.
This is what I do.
create a DefaultListModel object
add 8 elements to it ...
0
votes
0
answers
666
views
unchecked call to setModel(ListModel<E>) [duplicate]
In my application, in which I have two JLists, I'm trying to show the contents of the second one depending on what is selected in the first one. Let's say I have group 1, group 2 and group 3 at List1, ...
0
votes
0
answers
153
views
implements ListModel, need to update JList on Change
I have a custom collection which implements ListModel. When this collection changes, i need to notify the JList. Typically you'd fireListDataChanged, but this is not a method implemented by ListModel. ...
-1
votes
4
answers
365
views
ArrayList to JList - More than one object element
I'm using Eclipse, programming in Java. The problem:
This is how I want my JList to be displayed:
1 - Dante
2 - William
3 - Jaime
etc...
Now, the numbers are the IDs of the objects, and the names ...