We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 59c9ccf commit a030f59Copy full SHA for a030f59
sources/net.sf.j2s.java.core/src/swingjs/a2s/TextField.java
@@ -2,6 +2,7 @@
2
3
import java.awt.Dimension;
4
import java.awt.FontMetrics;
5
+import java.awt.Insets;
6
import java.awt.event.TextEvent;
7
import java.awt.event.TextListener;
8
@@ -29,6 +30,13 @@ public TextField(String text, int width) {
29
30
super(text, width);
31
}
32
33
+ private static Insets awtInsets = new Insets(5, 2, 5, 2);
34
+ // awt.Button has an unadjustable horizontal inset of what appears to be about 6 pixels
35
+ @Override
36
+ public Insets getMargin() {
37
+ return awtInsets;
38
+ }
39
+
40
public void addTextListener(final TextListener textListener) {
41
getDocument().addDocumentListener(new DocumentListener() {
42
0 commit comments