Why is the swing gui behaving strange?

I just started making my Java application on Minesweeper. The idea is a GridLayout JPanel inside a JFrame. But after executing the program I get some weird window. There is this strange gray corner on …

traverse an array in GUI Java

I am doing a questionnaire with questions and written answers. I need that when adding the answer, press the main button, tell me if it is correct or not and show me the other question of the array, …

Why is my image not being added? JavaSwing

I made this program, assume I have an extra src folder in my buildpath with the monkiflipppp.gif there. It just runs and has a button, but the button won’t actually do anything… Not sure if I need …

GUI Elements Not Showing Immediately

I made a redesign to my gui in java and it is facing an issue, the icons don’t show until i grab the gui and shake it, sometimes they show half then i have to grab it by the mouse and check it again …

Is there a way to make multiline JLabel text flow around the icon?

Currently in my project I have multiple JLabels each with their own text and icon The problem I have is that the icon take a whole left side to it self The effect I’m trying to achieve is to make …

How to place GUI components in java in the center?

I’m trying to create a mini form, that suppose to look like this: So far I got this: The problem is that I need to have this gap from the left, so that my form will be at the center, but I don’t …

How can I access the same text area variable?

The code below works as such: User clicks the run button Program reads the file from designated location Program removes content from , including tags themselves Program …

Put firebase data in a JTable

I am struggling to put some firebase data into a jtable in java swing. As seen in photo I’ve been able to retrieve the data from firebase but for some reason the data won’t be displayed in the JTable …

Swing – How to modify the border color of a JButton?

How to modify the border color of a JButton? I want to get something like this: But I canĀ“t modify the color, the borde is black: And If I try to add a LineBorder or any other borde, I am not able …

After inserting values in JTextField, their random value is not shown. How can I fix it?

I wrote this Java Application which is used to extract a random value from those entered in the JTextFields after starting a counter. Compiles and gives no errors, but the (“” +randomElement)…