Adding JavaFX PieChart in JPanel

I want to add a Pie chart inside a JPanel. I have gone through this and this. But it didnt helped me. I tried this code in the debugger but it is not getting pass line X. Somehow setScene function is …

JComponent not being drawn on JLayeredPane, JPanel is

I’ve added a JLayeredPane to a JFrame. To said pane i’ve added a JComponent with overloaded paintComponent(Graphics g) method, which calls super.paintComponent(g) among other things. The JComponent …

Enable a JButton when some component changed its border color [closed]

My goal is to enable a JButton only when some JTextFields and JComboBox change its border color from red to green. These components are included in three different JPanel. I try to create a function …

How can I set up a JFrame button to open another JFrame, and then receive information once the second jframe is closed?

This is part of a project for school, and I’m stuck and need someone to bounce ideas off of. I have a game where there is an option to sign up or sign in for a machine-local game so a record can be …

My JPanel doesn’t show after adding the paint method

I recently created my first board for my first board game and draw the board multiple ways on my JPanel.I finally decided to use Label, but since I needed to add pictures to that label, I had to …

How can you draw rectangles on a JPanel?

I’m trying to create a program that generates rectangles using a slider. The user should be able to move the slider and rectangles should appear on the JPanel above the slider with random positions. I …

Alternating between even and odd elements in Array with GUI

I’m trying to work with more GUI stuff but I’m having problem with something. I have an array of JLabels. Each of them contain 1 number from 0 to 7. I’m making the numbers “light up” by changing …

how do i use an image in java gui

Hi im making a Gui programme using a null layout and a setBounds() method for lay out . In the programme I want 25 strings printed out on the screen in random locations . I know that i could do this …

How to increase the slow scroll speed on a JScrollPane?

I am adding a JPanel in a JScrollPane in my project. All is working fine, but there is one problem about mouse scroll using the mouse-Wheel in JPanel. It’s speed is very slow on scrolling. How to …