Questions tagged as 'java-swing'

1
answer

Structure on Threads in Java Swing

I make my first consultation available and in advance I appreciate the future answers. To start I have a form that contains 2 jcombobox : jcbSerie and jcbPartido . The form integrates Runnable() In the form varia...
asked by 24.05.2018 / 16:37
1
answer

Adapt Java desktop application to any screen

Good morning, I am developing a very simple desktop app to test touch screens. The thing is that I want an app with 4 buttons that adapt to all screens and that comes out maximized when executed. Something like that The rectang...
asked by 26.10.2016 / 10:23
2
answers

It is possible to cast objects of abstract classes

hi how I have a question that is killing me I hope you can help me what I know according to what I understand:    You can not instantiate objects of an abstract class my doubt: The Graphics2D class inherits from Graphics both are ab...
asked by 16.05.2018 / 09:39
2
answers

How can I get the width and height of the screen with java?

I'm trying to take a screenshot with Robot() and doing some research I found that I could do it this way robotAwt.createScreenCapture The problem is that the createScreenCapture method receives a rectangle so I figured I could do s...
asked by 04.10.2017 / 18:04
1
answer

2 font styles at once with swing

I need a little hand, I'm with swing and to apply a font to a text I can only enter the classic parameters: Font despues= new Font(estilo,Font.ITALIC,tamaño); The fact is that I need to use 2 font styles at the same time, specificall...
asked by 16.05.2018 / 23:13
5
answers

[Ljava.lang.Object; can not be cast

I have the following problem, I want to make a query to my db, to bring a list of a related class, all worked with hibernate, but when I want to print on the screen it throws me the following error: Exception in thread "AWT-EventQueue-0" java....
asked by 09.10.2016 / 22:19
2
answers

How to run Java applications (.jar) without installing JDK - JRE on the computer?

Good afternoon, it happens that I made a Java application that uses external .jar for reports and other functions of the application. Also use SQLite. NetBeans by default creates a folder called 'dist' that contains the executable nameapp.jar; a...
asked by 29.01.2018 / 00:05
2
answers

How to perform an action when you stop writing in a JText Field in Java Swing? (something like Java's onChange script)

I have a JText Field where you can type the amount of a product and I want to call a function after filling the JText Field to be able to so convert the value entered in currency. I did not find something similar in Key events and used keyPre...
asked by 11.09.2018 / 00:05
1
answer

Send data to jInternalFrame with a button from another JinternalFrame, without losing its visibility. JAVA

My problem is that when I want to use the same function again (press the button to change the label for another value in the table), the first window runs out of functionality !. When it is done the first time it makes it perfect, but when wanti...
asked by 30.09.2018 / 09:52
1
answer

modify jlabel according to user logged in java

I need to modify a Jlabel of the main page according to the user that has logged in in the Login Frame. I leave the code that I am working on, in case you can help me. I remain attentive to your answers void generarNombre() { String...
asked by 21.08.2018 / 20:08