jtextfield
JTextField background color on enable/disable
i changed the background color of my JTextField to black when it is disabled.I do this using the UIManager and this property TextField.disabledBackground, that i set at开发者_Go百科 application start[详细]
2023-03-08 13:59 分类:问答how do i limit the length of the input i want inside a Jtextfield?
username = new JTextField(\"\"); us开发者_如何学JAVAername.setBounds(330, 550, 230, 30); username.addActionListener(this);[详细]
2023-03-08 12:52 分类:问答Get focus on a JTextField inside a CardLayout
I have a JTextField inside a JPanel A which is a part of CardLayou开发者_C百科t. When this A gets shown, I want to set the focus automatically to the JTextField (i.e. the cursor is flashing in the tex[详细]
2023-03-07 16:40 分类:问答Decorating a JTextField with an image and hint
I\'m trying to create som开发者_如何转开发e nicer looking JTextFields with an image and a hint. To do this I made a decorator that overrides the paintComponent method. The reason I used a decorator is[详细]
2023-03-07 11:06 分类:问答How to make the cursor in a JTextField span multiple rows in FlowLayout?
How can I make the cursor start at the top left of the JTextField? The text just stays centered when I adjust the height with .setPreferredSize(). Here is the code for the fields and buttons.[详细]
2023-03-06 03:14 分类:问答What listener should I use for a JTextField in a typing game?
Here is my situation: I am developing a java typing game, and I need to find the best listener for my JTextField.[详细]
2023-03-05 18:03 分类:问答automatic dynamic expansion / contraction of JTextArea in Java
I start off by creating a JTextArea of a specific size. The user can add text within it but it will get cut off if it becomes too long (vertically or开发者_如何转开发 horizontally). I want the JTextAr[详细]
2023-03-04 07:28 分类:问答HTML in JTextArea of JEditorPane, JTextPane
Right I already worked out that JTextArea or JTextField don\'t support HTML. I want to add text to a \"screen\" like a JTextArea and later keep appending text to it.[详细]
2023-03-03 04:25 分类:问答How to filter illegal/forbidden filename characters from user's keyboard input in JTextField?
I want to filter user\'s keyboard input for illegal/forbidden filename characters in JTextField. I have already set uppercase filter in JTextField.[详细]
2023-03-01 00:54 分类:问答How to get JTextField name in which is Document placed?
Is there something like event.getSource for DocumentListener too? Im trying to change color of just one JTextField in which is text changing.[详细]
2023-02-28 17:20 分类:问答