Most voted "jlabel" questions
Jlabel is a Java-Swing component to display a short text sequence, image or both.
Learn more…15 questions
Sort by count of
-
4
votes1
answer645
viewsTemporary text in Jlabel
I would like to exchange the text of a JLabel and leave it for just a few seconds, then go back to the previous text. I have to execute a method that takes a few seconds to get ready and would like…
-
2
votes1
answer504
viewsHow to make this relief by hovering your mouse on a Jlabel?
The board is 500x500 and each square of it is 50px, so the variables NovaPosicaoX and Y always take the edge of the square where ta the mouse pointer. The problem is that the relief only works on…
-
2
votes1
answer1273
viewsHow to make part of the Jlabel text bold
Is there any way to leave only a portion of the bold text of a Jlabel? For example: label.setText("apenas esta parte em <b>negrito</b>"); But this snippet of code prints the 'b' on the…
-
2
votes1
answer1282
viewsChange label color according to screen state
I’m having trouble changing the color of a label’s content according to the state of my screen (enabled/disabled). I wonder how I do so I can make him change the color. I made a very simple example…
-
2
votes2
answers804
viewsFormat Jlabel text with different colors
How could I format with different "properties" a JLabel and its content? For example, I wish I could set a color for my text JLabel, and another to string that this concatenated with it. It is…
-
1
votes1
answer315
viewsHow to capture colors from an image on a Jlabel that behind another Jlabel?
I need to get the pixel colors of an image inserted in a JLabel with MouseMotionListener, and this Jlabel is under or behind another Jlabel. I know it is possible to get a background color behind a…
-
1
votes1
answer185
viewsMy Jlabel does not appear
I’ve used several commands to make this label appear, but I can’t, in this object I’m using Paint and ActionPerformed, but no Drawing this overlapping this label and even then it does not appear,…
-
0
votes2
answers788
viewsHow to add text + icon to the label?
I’m in trouble, so I can add a JLabel with a word before an icon. I put the image in my package, and passed the way, the problem is that the label is concatenating with the String (the word I put…
-
0
votes0
answers231
viewsHow do I list an Arraylist within a Jlabel
Person would like to know how to print an Arraylist inside a Jlabel, I am using Joptionpane but it shows one element at a time would like to show all the elements in a single window. Follow the code…
-
0
votes1
answer177
viewsProblem displaying results in java label
package cursoemvideo; /** * * @author DANIEL */ public class TelaCalculadora extends javax.swing.JFrame { /** * Creates new form TelaCalculadora */ public TelaCalculadora() { initComponents();…
-
0
votes1
answer34
viewsHow to call a Jlabel with its content from another Class?
In a certain class I have a Jlabel thus: public class Links { private JLabel link; lblLink.addMouseListener(new MouseAdapter() { public void mouseClicked(MouseEvent arg0) {…
-
0
votes1
answer61
viewsAccess Jlabels without using switch case...
I’m developing a game with JLabel from 1 to 50, I can access them online without having to use a switch. You can verify that what changes in the code and only the lblBoard1 or lblBoard2 and so on,…
-
0
votes1
answer673
viewsDynamically define text to Jlabels according to text field validation
I tried to add one label for each required component of my screen that is empty (field 01 and field 02), so I created a list of labels with the corresponding amount of fields/components. However,…
-
0
votes1
answer81
viewsMy icons are not being added to . JAR
Good afternoon, I’m having a problem when compiling my application. I’m using Apache Netbeans 11.0 Java 8 I’m having trouble setting an image on a Jlabel. Call me back Expection in thread…
-
-1
votes2
answers242
viewsHow to change the value of a jLabel with a jButton (Netbeans)
I’m a beginner in Java, and I want to create a supposedly very simple program. Inside a panel there is only a jlabel and a jbutton. jLabel has the value "0". When Clicking on jbutton, the idea is…