Category "swing"

MySQL error Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException

This is my register page: Registration was working before adding Email checker functionality. This function for check did someone used this email on database.

How do I center align the components in a Java GUI?

I am a beginner programmer and I'm currently working on a project by making a simple Login screen layout using Java. So far I'm doing pretty good, but is there

How do you embed a Swing JPanel into a JavaFX frame?

From Integrating JavaFX 2.0 with Swing and SWT there is a code that allows you to embed a JFXPanel inside a Swing JFrame. I was wondering is there a reverse of

GraphStream & Swing - Can't display my graph correctly

I'm a beginner with GraphStream and Swing, I would like to insert a Graph in a JPanel, but while trying I get the following display: Main Frame I added a graph.

How to Remove Red JFormDesigner Evaluation Text?

I installed JFormDesigner for IntelliJ with an evaluation license to convert some forms from NetBeans, and upon realizing that it put a huge ugly watermark on e

How to Overlap Panels in Swing?

I am attempting to have multiple JPanels that can "overlap", also allowing me to perform custom painting. For this I am using a MainPanel, which extends JLayere

UNDO/REDO for JTextArea

I am writing a text editor. And here I ran into a problem. I need to implement UNDO and Redo function for JTextArea. For this I use UndoManager. But, if I cance

How to combine rectangles?

I am working with the Java Swing library. I have two rectangles of the same width and height and the same coordinates. I want to combine them into one so I can

Why are none of the titles showing in JTable?

I added some rows to a DefaultTableModel, but none of them was shown. My question is - what is the problem? It seems to me like Intellij idea just playing a jo

Colored Emojis in Java Swing Labels

I was wondering how to dispaly colored emojis in swing. I have a feeling that the Swing (awt) font engine is unable to do this. I've tried using the windows emo

Drawing multiple objects in Java [duplicate]

I would like to draw multiple objects like ovals, rectangles and lines together. But somehow I can draw only an object. When I try to draw ano

Eclipse windowbuilder not showing the full frame

I'm trying to use Eclipse windowbuilder, but when I go to the design page the frame gets cut. Below is an image of what I am seeing. This is just a simple JFra

How to get file's icon and type description in Ubuntu?

With Java 11 on Windows, I can get info about my files using: import javax.swing.filechooser.FileSystemView var type = FileSystemView.getFileSystemView().getSy

Can't close JFrame, from click inside JPanel

I have the following situation: I have a JFrame(GridBagLayout) with 3 JPanels in it (headerPanel, bodyPanel, footerPanel); On the bodyPanel I have a login butto

How to fix scaling of a java-based application on a high dpi display in linux?

I just switched to java 11 (AdaptOpenJDK) so that my java Swing application looks ok on high dpi displays at different system scaling settings. It works ok on

How do I use the same variable between buttons?

I've created a rock paper scissors game in java, but I don't know how I could use the same variable to work between 3 different buttons (rock, paper scissors).

Issue on label and panel's transparency

Here there is my frame: As you can see, there are some components (JLabel, JPanel, JTable, JScrollPane) on which I called the metod setBackgroundColor(new Colo

Make JTable cells in specific column scrollable

I'm creating GUI in java using swing. I use JTable that looks like this. I need to make cells of last column("Popis") to be scrollable as there will be descript

Why does my for loop to disable buttons not work, but the same loop works for setting colors in JFrame?

I am programming a TicTacToe game and I want to use a for loop with my JButton components inside them like this: private void clearField(){ for (int i = 0;

JInternalFrame Issue

I could not use JInternalFrameForm in Netbeans. I did right click on my package and go new but I did not see JInternalFrameForm option.