jframe
Java JFrame / Canvas doesn't repaint
A mouse listener calls repaint() and I can see that it does actually go past the drawing part because I see globalcounter incremented in the output of System.out.println(). On the screen, however, I d[详细]
2023-04-09 10:29 分类:问答How can I resize and paintComponent inside a frame
Write a program that fills the window with a larrge ellipse. The ellipse shoud touch the window boundaries, even if the window is resized.[详细]
2023-04-09 10:15 分类:问答Issues with JButtons and ActionListeners
So I have a paint program with multiple JButtons, the only way i know how to relate that button with the action of that button being click is to do something like if (e.ActionCommand().equals(\"Label[详细]
2023-04-09 07:27 分类:问答How to make the JInternalFrame of the specified size?
I have a JFrame. I have added menu-bar to it. I have set its size and location using following line. frmMain.setBounds(0, 0, 1024, 768);// JFrame[详细]
2023-04-09 06:26 分类:问答Java - my paint program needs a menu bar with a submenu with an image - how to do?
SO I have this program that is kind of like paint, it lets you draw shapes and lines, but my assignment is to add a menu bar with a sub menu Fil开发者_开发问答e-> About, when Click on the about sectio[详细]
2023-04-09 02:23 分类:问答Java: How can I disable clicking on a panel while showing dialog?
I want to disable clicking on the background panel or frame while showing a dialogue. And I want the dialogue t开发者_如何学Co appear on top of this panel or frame constantly until it is closed.[详细]
2023-04-09 00:44 分类:问答Counter to Close JFrame, bring up Confirm Dialog
This post relates to my last one regarding a timer. I decided the easiest thing to do for immediate results was to just write a Counter thread that counts down from a certain time (in this case 5 seco[详细]
2023-04-08 17:48 分类:问答JFrame Icon in Netbeans
I\'m Building a Swing Application and 开发者_Go百科I need to know how to set an Icon for my JFrames through Netbeans 7.0 if it is possible.[详细]
2023-04-08 15:42 分类:问答How to check if one graphic is overlapping another?
I\'ve looked on Google and still couldn\'t find anything.I had an idea for a simple Snake type game or like a \'Coin Collection\' game using 2D graphics,but if a coin is a graphic and the moving chara[详细]
2023-04-08 10:22 分类:问答adding multiple components to Jframe.getcontentpane()
I have a class that extends JPanel and draws a triangle. I called it from other class to create three triangles but when third triangle is drawn the previous two disappear开发者_Go百科ed. How can I ad[详细]
2023-04-08 07:39 分类:问答