java - Reaching JTextField in a DocumentListener -
So, I ended up making a Sudoku Solver, but I want to improve it. To do this, I need to reach I need to reach I have all my ( I really can not fully understand what you are saying But I believe that is what you are looking for: betterJTextField to
documentListener . I am using a
documentListener to read from my
betterJTextFields in real-time, I have the problem that
insertUpdate (DocumentEvent e) .
Better Zest Field that happened to
DocumentEvent . For example, if invalid input,
would be better zestfield turn red etc.
better zestfield in the matrix if you should know. Each area handles a number in the Sudoku.
@ Override public zero inserted (DocumentEvent e) {// Code removed which checks that the input in the fine zest field is OK. }
JFormattedTextfield extended
JTextField )
public class betterJeststeffiledJFormattedTextField {private int row; Private int column; Public BetterJustStस्à¤field (format format, infinite row, EIT column) {super (format); This.row = Line; This.column = Column; // To-O Auto-Generated Constructor Stub} Public Ent Miller () {return line; } Public int getColumn () {return column; }
Personal Static Class RedDocumentListener Document Listener {Private JTextField textField; Public RedDocumentListener (JTextField textField) {this.textField = textField; } @ Override Public Empty Update (DocumentEvent E) {textField.setBackground (Color.red); } @ Override Public DownEvent e {textField.setBackground (Color.red); } @ Override Public Old Replacement Update (DocumentEvent E) {textField.setBackground (Color.red); }}
Comments
Post a Comment