I have a java library which heavily uses java.awt.Graphics2d. I want to port my library to html5 canvas by using gwt.
I have a JTextArea for which I have set word-wrap and wrap-style-word to true. I want to \"pack\" the JTextArea to the minimum possible height given a specified width.
I have an angle in a frame (I draw it with two lines). I want to make it flexible to frame; I mean, when the user expands the frame angle also become expanded and vice versa. I tried a lot of examples
The \"Painting in AWT and Swing\" docs state the following. \"If multiple calls to repaint() occur on a component before the initial repaint request is processed, the multiple requests may be collaps
I wonder if it is possible to implement a GUI panel (possibly JPanel) that is of square shape but rotated 90 degrees. Obviously, there will be a top-level container whi开发者_运维问答ch contains this
I have a situation where a user enters a String and my code makes a Jlabel fo开发者_如何学Gor it and attempts to center it on a full screen JFrame/Pane. My problem is, to be able to accurately center
I am a starting Java developer, learning just from internet tutorials. I am learning full-screen GUI applications. I was told yesterday that I shouldn\'t use AWT in my programs because it is outdated.
i am trying to write a code for my task. my task is, i have draw may polygons on a single panel by giving coordinate values. and aplly mouse moved event to those polygons.
I have a simple GUI with a JTextField and an AWT Canvas (to prevent the counter-question as to why I\'m using an AWT Canvas: I need to have a window handle).
I\'m using it in Applet. Here is source of init function: java.awt.Canvas awtParent; setLayout(new java.awt.GridLayout(1, 1));