Questions tagged as 'swing'

1
answer

Chat Client-Server Application with Sockets not working

I'm doing a project and I got to the part of the communication between the server and the client and I did not get the output I wanted (output image intended). The goal is for the server and client to communicate with each other. That is, to...
asked by 24.11.2015 / 23:50
1
answer

How do I determine if a point on a swing component is visible on the screen?

How do I determine if a particular X point inside a swing component is visible on the user's screen? For example, let's assume that% w / w has been added to a B window (usually, but not necessarily, a% w of%). > Using the JComponen...
asked by 11.01.2015 / 13:57
2
answers

How do I apply a StyledEditorKit to a JTextPane without having to inherit this class on my screen?

I have a tab problem in JTextPane and I am trying to reduce the default value assigned to it but it is giving an error because I have to inherit two classes (one for JFrame and the other for overwriting the tab functions ) but Java...
asked by 21.10.2016 / 15:30
1
answer

How do I populate a JTable?

I have a fairly simple java application that connects to a database, in the console I type the query I want to pass by parameter to the executeQuery. Now I need to pass all this to a graphical interface. Is there any way I can create just one wi...
asked by 10.06.2014 / 06:03
2
answers

Customizing JTextFields

Many professional programs use JTextFields or JButtons with different borders. Would anyone have code examples to change the design of these buttons and text fields to something like the following image? I believe it's with an @Over...
asked by 11.07.2014 / 01:48
1
answer

how to center the TabbedPane tabs?

I've been researching, but I have not found it. I would like to know how to center tabs on a TabbedPane. They always start from the left, but since they are just two tabs, you want them to be centered. Illustrative example: Simpleexample:...
asked by 03.12.2016 / 19:40
1
answer

What is the difference between setSize and setBounds?

What is the difference in Java Swing between setSize and setBounds ?     
asked by 13.07.2015 / 02:26
1
answer

What is the difference between revalidate () and repaint ()?

When working with swing, we usually call one of these methods after some change in screen components. But what's the difference between using repaint() or revalidate() ? In what situation should I use one or the other, or even t...
asked by 28.07.2017 / 16:18
2
answers

How to access static jTextField created with swing?

So, guys, I have a jTextField that works normally, but when I put it as static setText does not work anymore, and I need it static because I do the same for a function, I did it without swing and it worked out I do not kn...
asked by 14.03.2014 / 13:44
1
answer

How to create an application from a Maven file?

I was working with EJB and dealing with four simple Maven projects, a web project, a desktop (JSE Swing), a project (JSE) that had only the interface and lastly a web project (which I called Core ) that implemented this penultimate project that...
asked by 22.12.2015 / 17:09