Questions tagged as 'jlabel'

1
answer

Temporary text in JLabel

I would like to change the text of a JLabel and leave it for just a few seconds, then return the previous text. I have to run a method that takes a few seconds to get ready and would like to notify the user that it is running and this way...
asked by 07.12.2015 / 23:49
2
answers

Format JLabel text with different colors

How can I format a JLabel and its contents with different "properties"? For example, I'd like to be able to set a color for the text of my JLabel , and another for string that is concatenated with it. It's possible? In...
asked by 06.08.2017 / 04:42
1
answer

How to do this relief when hovering on a JLabel?

The board is 500x500 and each square of it is 50px, so the variables NovaPosicaoX and Y always take the border of the square where the mouse pointer is. The problem is that the relief only works in the squares of the window bord...
asked by 29.12.2016 / 18:30
1
answer

How to leave part of the JLabel text in 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 code snippet prints the 'b' on the screen too.     
asked by 11.08.2017 / 16:55
1
answer

Change label color according to screen status

I'm having trouble changing the color of the content of a label, according to the state of my screen (enabled / disabled). I would like to know how I can to make it change the color. I made a very simple example (without worrying about the...
asked by 21.04.2017 / 19:56
1
answer

How to capture colors of an image in a JLabel that behind another JLabel?

I need to get the pixel colors of an image embedded in a JLabel with MouseMotionListener , and this JLabel is under or behind another JLabel. I know I can get a background color behind a JLabel, but what I need to capture are colors...
asked by 14.04.2017 / 04:14
1
answer

My JLabel does not appear [closed]

I've used a couple of commands to make this Label appear, but I can not, in that object I'm using paint and ActionPerformed , but no drawing is overlapping this label and even then it does not appear, p> package scenes; import java.awt.A...
asked by 11.12.2017 / 19:31
2
answers

How to add text + icon in the label?

I'm having problems, so I can add a JLabel with a word before an icon. I put the image in my package, and I passed the path, the problem is that the label is concatenating with String (the word I put before), and instead of leaving...
asked by 11.05.2017 / 07:06
1
answer

Define text to JLabels dynamically according to validation of text fields

I tried to add a label to each mandatory 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, the attempts I made to "set" the co...
asked by 04.12.2017 / 20:59
1
answer

Problem in displaying results in label in java [closed]

package cursoemvideo; /** * * @author DANIEL */ public class TelaCalculadora extends javax.swing.JFrame { /** * Creates new form TelaCalculadora */ public TelaCalculadora() { initComponents(); pnpPainel.set...
asked by 18.09.2018 / 19:12