Skip to content
Advertisement

Tag: jlabel

Trouble spacing in JFrame

I am new to Java, what I am trying to do is generate a GUI with a bunch of images I have managed to generate a bunch of images, however, they have unnecessary space between them horizontally, is there any way that I can get rid of this currently I am generating them like so? is there some other method

How to change (add or subtract) the value of a JLabel?

I wish to add 100 EUR to a JLabel (500 EUR) with a JButton (***). Since I cannot add nor subtract an int value from a String, I don’t know what to do. GUI Answer How to change (add or subtract) the value of a JLabel? … Since I cannot add nor subtract an int value from a String, I

Display all the items I have ordered

How to display all the items I have ordered in “Sales Report File”? Like whenever I ordered 2 cookies, It will display on the Sale Report file. I have this code currently.. Answer If you want like a text list of what you have ordered, you can simply create an ArrayList<String> and every time you click on a product you

Make a typewriter effect in a jlabel

This is my JPanel which I’m adding in a JFrame, but the code that write letter per letter but when executed freezes and sometime later, the text appears, the text is not writing with that effect, but I think it should be working, why? when the program run and i press the buttom to run the type writter eefect, the

Java Rotating Icon in JLabel

Hi I’m having a problem trying to rotate an image inside a JLabel. I got this code from StackOverflow, and I’m trying to change it a little bit so that instead of the image rotating in a Tab, it is rotating within a JLabel. This is working, the image is rotating. However when i change it to this. This stopped

Advertisement