| Author |
Can I add extra field in my GUI?
|
FeiWen Cheng
Greenhorn
Joined: Dec 20, 2004
Posts: 21
|
|
Hi.I am designing my gui now on, and I have some problem in designing GUI. Thanks for any suggestion! My assignment is urlybird 1.3.2. (Question 1) In my assignment, there are 7 fields in each record(name,location,size,smoking,rate,date,owner). I use the MVC pattern to implement my GUI. In order to keep previous selected data to be selected after refreshing data in the JTable. I have to use some filed to identify which field was selected before refreshing the JTable. I think each field in the record is improper to be a primer key, and it's improper to combine them to be a compound key. Therefore I want to add the recNo as the first column in the JTable. After add this column, I can easily to implement the function! Is it illegal to sun' rule? (Note: recNo is a physical index of records in my db file) ----------------------------------------------------------------- (Question2) In my GUI. I have a JTextField to let user imput the customer(owner) ID. The length of customer ID is 8 characters. How to restrict user only key in customer ID with in 8 characters? Thanks for you suggestion!
|
SCJP(1.4),SCWCD(1.3,1.4),SCBCD,SCJD(1.4),SCJD,SCMAD(1.0)
|
 |
Steve Chaloner
Greenhorn
Joined: Jan 07, 2005
Posts: 22
|
|
1. Consider using the record number and having it read-only, or present only in the model and not the view 2. Check out JFormattedTextField
|
Steve Chaloner<br />-----------<br />SCJP 1.4<br />SCWCD 1.4
|
 |
dennis du
Ranch Hand
Joined: Dec 31, 2004
Posts: 59
|
|
----------------------------------------------------------------------- 1. Consider using the record number and having it read-only, or present only in the model and not the view ---------------------------------- I had put the recNo to the JTABLE(view). I think it is legal to sun's request. Is it right?
|
-------------------------------<br />OCP 9i <br />SCJP/SCJD/SCWCD(92%)/SCDJWS<br />XML(IBM Test 141)<br />Who is the next?SCBCD<br />SCBCD/CCNA/CCNP/PMP<br />not sure
|
 |
Steve Chaloner
Greenhorn
Joined: Jan 07, 2005
Posts: 22
|
|
I don't think it makes any difference since it will be generated by you anyway. If you're adding a function to navigate directly to a record by number then it's better to show it If you don't add this function, then it's of no use (that I can think of) to the user so it's better kept out of the view.
|
 |
FeiWen Cheng
Greenhorn
Joined: Dec 20, 2004
Posts: 21
|
|
Thanks Steve. I will try it!
|
 |
 |
|
|
subject: Can I add extra field in my GUI?
|
|
|