I'm trying to add 4 panels so that they stay one below the other. So I decided to use BorderLayout , along with "positioning" ( NORTH , SOUTH and etc), passing index , however, it ends up jumping the second panel.
Does...
Before asking this question, I looked in the forum and in several places but I could not solve ...
I have a comboBox that already loads the names of the clients, there I wanted to select the client, and on a ok button to fetch that cli...
I am not finding a method to organize the lines within a JTextPane, and I need to continue styling but also with a Word Wrapper, is there any method or component that makes it look like this?
public class PanelTeste extends javax.swing.JFrame...
I have a JLabel that receives an event, and would like to disable this event when the component is disabled (setEnable = false), and only activate it again when the component is enabled.
What I did:
import java.awt.Cursor;
import java.awt.e...
I'm trying to create a project where I print multiple phrases in a JTextArea , but for this, I need to include a JScrollPane . I looked at some examples on the internet but none are working.
public class Projeto extends JFrame {...
I need to draw a GIF, I have the following code:
public BasicBlock(String path, String name, int id, boolean gif){
this.path = path;
this.name = name;
this.id = id;
File img = new File(path);
try {
image = Image...
I'm trying to handle a possible empty search, when the user gives enter in a field without typing anything. I've applied a keyboard event, and every time you press enter, the field performs a search.
The problem is that if the message appea...
Well, I'm developing a project that simulates the controlled environment of train tracks, where I have 3 trains running clockwise, where the three pass through the same place in certain sections. I'm having trouble implementing the train speed d...
I created a Maven Java Application project and only created a layout of a screen. When I try to run, it displays the error of NullPointer , and I have not yet implemented any code other than the ones generated by IDE itself.
What could...
I created a JFrame that, when clicking the keyboard buttons: up, down, left and
right, a certain action should take place (a Joption in the case).
For this I am using a KeyListener , but unfortunately I click on certain buttons a...