Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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 ...
SpaceSpaghetti's user avatar
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 ...
rasweeny's user avatar
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 ...
Ted pottel's user avatar
  • 6,983
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, ...
Hector Guerra's user avatar
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. ...
CoupFlu's user avatar
  • 321
0 votes
2 answers
183 views

How to transfer one ListModel into an other one in Java

I have two ListModels: listModelRight und listModelLeft. I just want, that listModelRight = ListModelLeft, but even this dont work. How can i do it? Code Example: listModelFilterleft = ...
J. K. Wilke's user avatar
-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 ...
HWerneck's user avatar
2 votes
1 answer
2k views

How exactly do I use the "fireContentsChanged" method in java.swing.AbstractListModel?

How exactly do I use the fireContentsChanged() method in java.swing.AbstractListModel? This method is called when some of the ListModel's elements have their "contents" changed. Does this only mean ...
David Joseph's user avatar
0 votes
1 answer
237 views

Save/Read Custom Arraylist in Sharedpreferences [duplicate]

I'm working on a app where you can save and read homeworks, for the "undone" progress I want to save the Arraylist, where I saved all homeworks, in the Shared Preferences. I hope you know what I mean, ...
rib's user avatar
  • 200