Questions tagged [Swing] (134)

0
answer

How to rotate a rectangle around itself in Java Graphics2D, that is, along the z-axis?

Using the scale and shear I get a turn, but there must be a matrix.
Wanda_Moo asked April 16th 20 at 10:28
1
answer

How to leave active JFrame while a loop in the main thread?

I want to make the app start unpacking the archive in a separate thread, but before that there would be a JFrame with a progress bar. He would have been fully active during decompression, but the code in main thread will run after the files are extracted (to do this I want to use an infinite loop that will stop after decomp...
rodrick.Gerlach asked April 8th 20 at 10:10
0
answer

Why this code only works in windows?

There is a form on which is placed a panel jPanel1, on this panel the text fields. There is also a switch for the jToggleButton. It is necessary that when you click on this switch is changed the input language on the panel. Doing it this way: private void jToggleButtonLangActionPerformed(java.awt.event.ActionEvent evt) { ...
Maximo asked April 8th 20 at 02:39
1
answer

The sticking buttons of the interface or how to add event function call Swing?

There is code://The handler when the button is clicked in the window interface class ListenerAction_start implements ActionListener { public void actionPerformed(ActionEvent e) { System.out.println("\n" + "You selected -> ["+ e.getActionCommand() + "]" + "\n"); Start_main(); } } class ListenerAction_stop implement...
Charles33 asked April 3rd 20 at 19:03
0
answer

How to render a nested Jpanel using the paint method in Java Swing?

I need to make a small app where a background picture will be several dials with changing values. I can these dials positioning using GridBagLayout, but don't know how in this case to make a background image for the panel. I'm using the paint method draw this background image manually, but in this case I do not know how to...
Ned.Heathcote asked April 3rd 20 at 18:49
1
answer

A bunch of keys on the keyboard with the button on the box in Swing?

Hi, there is a mold with two buttons on it, how do I associate a particular key on the keyboard with the press of a button on the form that when the key is pressed pressing push button? Preferably with sketch code with the details, thank you!
Haylee25 asked April 3rd 20 at 18:18
0
answer

As in swing to create the picture after some time?

https://github.com/DeadSidert/myGame Then as if the battle involves 2 teams, there are archers and infantry. With the infantry sorted out. but the archers... how to create the arrow, then to her to manipulate as a marine? Trying to do so. what if on the battlefield, have enemies. the archers will try to shoot. but provided....
Ethan69 asked April 3rd 20 at 18:05
1
answer

In the game on java swing animation itself does not work. why?

Write a simple game in swing, learn him, so to speak, the essence of the issue: my animation works only if I expand or reduce the opposite window frame. otherwise nothing happens, what to do? https://github.com/DeadSidert/myGame
cristia asked April 3rd 20 at 18:04
1
answer

When drawing graphics erased half of it,how can I fix it?

create a graph direct lemniscata in java, it should look like this: When you draw the entire graph is drawn, but then disappears right part, how can I fix it?import java.awt.*; FillPolygonCanvas class extends Canvas{ public int x0 = 200; public int y0 = 200; public int a = 100; public double y; public double x; publi...
Catherine_Windler asked April 2nd 20 at 17:15
0
answer

How to align the checkboxes on the left edge?

There is a window where the checkboxes are located unsightly whether it is possible as that to fix it?And another question under the asterisk: is it Possible to make the border for the text field?(right)
breana asked March 31st 20 at 21:23