Skip to content
Advertisement

Tag: swing

JScrollPane doesn’t show up in JFrame

there. I’m writing a GUI chat client which sends message to the server and receives echoes from the server. The top half of the client JFrame contains a JTextArea wrapped in a JScrollPane which is placed under the menubar. This JScrollPane is responsible for receiving responses from the server which receives messages from a client and broadcast it out to

Recover data after closing a Jar file

I am working with a jar file that deals with a program where I open a window (using JFrame). In this window, I manipulate some data and store some of it in the private fields of a class. When I close my windows and reopen my jar file, all my data is lost. How can I save my data so

How do I change the background color of a JFrame dynamically?

I was wondering how would I change this block of code to be able to have a dynamically changing background colour that switches from (red -> black -> green -> black -> blue -> black ->red) and the loop starts again. The background colour should be continuously changing per tick. Right now I have a render method that will continuously

I have a problem whith adding a Container in a JFrame

I am a student in informatics and beginning in Java, I want to create a project which will allow me to make a calculator. I am encountering a problem which is the following: I want to add Container in my JFrame with add(contenu), but it gives me the following warning : I don’t understand why this problem appears. Here are

Advertisement