Skip to main content

Questions tagged [jlist]

JList is a Java Swing component that displays a list of objects and allows the user to select one or more items. A separate model, ListModel, maintains the contents of the list.

jlist
0 votes
0 answers
47 views

Can I delete a certain character from a JList?

First of all, English isn't my native tongue. So sorry in adavance for any mistakes! For a project of mine I want to have a list with numbers the user decides to put in, and all of these numbers get a ...
Phatbottle's user avatar
-1 votes
1 answer
58 views

Jbutton should open a JList and then append JtextArea but nothing happens when I press it?

public static JButton scene() { JButton scene = new JButton("Scene"); ImageIcon sceneIcon = new ImageIcon("src/Images/scene.png"); scene.setIcon(sceneIcon); ...
BengalTiger's user avatar
0 votes
0 answers
38 views

How to Override File Renaming Event Trigger in JList of JFileChooser

I'm working with a JList inside a JFileChooser and I'm trying to achieve a specific behavior related to file renaming. In JFileChooser, files displayed in the JList start the renaming process after a ...
Vasiliy Sokolov's user avatar
0 votes
1 answer
31 views

How to get JList getSelectedValue() to return a Class Object?

I am using a JList that contains Objects of Houses with addresses. The Houses are in a TreeMap (Not sure if that was the best choice) in a Neighborhood class. I am using Map.Entry and .entryset() to ...
chalcedony's user avatar
0 votes
0 answers
44 views

JList keep heighlight after focus is lost

How to keep highlight (selected item) after focus on JList is lost. setSelectedIndex didnt reselect the item after focus lost. list.addFocusListener(new FocusListener() { @Override ...
helers's user avatar
  • 1
0 votes
3 answers
74 views

How to Edit JTextField Background in JFileChooser for File/Folder Name Editing

I'm working with a Java Swing application and facing a challenge with customizing the JFileChooser component. Specifically, I need to change the background color of the JTextField used for editing ...
Vasiliy Sokolov's user avatar
0 votes
1 answer
43 views

Remove MouseWheelEvent/MouseWheelListener awaiting execution in Java Swing

I have an implementation where I want to reload data while scrolling a JList after scrolling every 100 records. I have a large database, and it takes around 7 seconds to load the JList. Therefore, a ...
slow_learner's user avatar
0 votes
0 answers
35 views

JList prints duplicate values on console, display single values on GUI

I was trying to troubleshoot the code that why JList prints same values x2 times on console, but on GUI it shows only x1 time. I need ID on backend to do more functions, but it comes x2 time. The ...
Alpha's user avatar
  • 187
-1 votes
1 answer
41 views

Every time I click on a Jlist item, the listener is invoked an increasing number of times even though my code only runs if(!e.getValueIsAdjusting())

I'm using Netbeans to create a jlist using the design tool, so there is auto generated code in there. I have seen a lot of people getting their listener invoked twice, which was corrected for them by ...
Jay's user avatar
  • 23
1 vote
1 answer
85 views

JList - Horizontal list, visible amount of values

I'm trying to create a horizontal JList with seven items inside a JScrollPane and only three of those items need to be visible and the others accessible via a scrollbar. Here's an example of what I'm ...
Obaraten64's user avatar
-2 votes
1 answer
2k views

How to display a list of objects as a JList in java swing?

We are asked to build a system in Java Swing no drag and drop and I cannot understand how to display a list of objects in a JList. I have a GUI class that creates a JFrame, JPanel, and an empty JList ...
rainbow's user avatar
0 votes
0 answers
39 views

How can I create Shuffle play (with GUI) in java

I have to create an application for audio stream with different functionalities. I am stuck with the shuffle play action. Because on my previous project were GUI wasnt included I created this method ...
Nafsika's user avatar
  • 47
-1 votes
1 answer
21 views

conflicting type with JlistSelectionListener

I have the folling code : import java.util.ArrayList; import java.util.List; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.List; public class fenetre extends ...
Toven's user avatar
  • 1
0 votes
1 answer
110 views

How to specifically change the Color of one row of a JList?

I'm in need of help since i cant get my head around this problem. I want to ping ip's and if they are reacheable then the specific row should be green and if theres no answer it should be red. Also it ...
Ljonja2107's user avatar
-1 votes
1 answer
96 views

How do I update the quantity of an item without spawning a new object inside my JList

I want the quanitity shown in (*) to update the value whenver I select an item from the JList and change the quantity of the item without spawning another object in the list. public void saveList() { ...
Shaqiloheal's user avatar

15 30 50 per page
1
2 3 4 5
123