Questions tagged as 'swing'

1
answer

How to initialize a blank JPanel?

I'm starting to work with the swing and event handling package and here's what I came up with to test some program that would create rectangles of random sizes and colors. The creation of the code and execution went all out, except that the fram...
asked by 26.06.2017 / 04:34
2
answers

java.lang.NoClassDefFoundError error while executing application

I made a program in java that uses JDateChooser so that the user chooses the date that he wants. It works normally inside Eclipse but when I export the project to a .jar and try to run through the cdm it has the following error:...
asked by 28.06.2018 / 19:30
2
answers

Correct display of RadionButtons

I am trying to implement a JRadioButton but after inserting the 2 in the form, only one is displayed, does anyone help please? package com.roknauta.fasttracker.utils; import java.awt.Component; import javax.swing.JFrame; import javax....
asked by 02.03.2018 / 19:41
1
answer

Disable JFrame maximize button

I set the size to 600x600, but wanted to know how I do it, when I click on maximize, do not run out of background or even take the maximize button and just let it down and close. code:/**Tochangethislicenseheader,chooseLicenseHeadersinProje...
asked by 26.11.2018 / 13:13
1
answer

Apply focus to component

I have a component that is a JPanel that contains two JTextFields , I wanted to be able to apply borders and backgrounds only to the JTextFields , without applying it in the panel. I treat everything on the main screen to b...
asked by 21.06.2017 / 05:11
1
answer

Creating component dynamically

I made a method whose goal is to add a quantity of checkBoxes according to the value of a variable that I'm going to receive. I wanted it to stay inside a scrollPane so it would not take up more space than I set. What I could not do was make...
asked by 08.07.2017 / 03:17
1
answer

ArrayList giving error

I'm doing a database program and I'm not able to make my list appear in jtable . I created the method and at the time I call it my method of error, can someone help me the code is down there? Error:    Exception in thread "AWT-EventQ...
asked by 05.03.2017 / 15:40
2
answers

Display date correctly in a JTable

I'm not able to display the sql database date type Date in JTable, the date appears like this: Iusethefollowingmethodtocallthetabledata:publicArrayList<Alunos>read(){PreparedStatementstmt=null;ResultSetrs=null;ArrayList<Aluno...
asked by 27.11.2018 / 20:42
2
answers

How do I popup a new JFrame?

How can I do when when I press a JMenuItem it shows a window where I would have to insert, for example, a date and select from a pair of checkboxes? In short, how do I popup a new JFrame ? Thanks for the help!     
asked by 13.12.2015 / 23:15
2
answers

How do I remove a band by its name?

I can not get the bands inside the arraylist. For this, I read the .txt file where the information (name, country, nrointegrantes) is stored. I did a split to access the name, but when I try to remove one of the bands by the name I'm not getting...
asked by 13.11.2018 / 02:56