|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
Table and abstract classes Hello, I have a window with a JMenu. In addition, a class retains values int and double. I use it in tabular form: Code: val [] = new TDP val []; |
#2
| |||
| |||
Re: Table and abstract classes Hello, I do not know of which problem are you talking about. And I do not see where your problem is the menu. See, the code below , I do not think that there is any problem in it. Code: JMenuItem jmenu = new JMenuItem("button menu"); jmenu.addActionListener( new ActionListener() { Public void ActionPerformed(ActionEvent e) { TDP[i]. setval(int...); } } ); |
#3
| |||
| |||
Re: Table and abstract classes Hello, I think I have a similar kind of a problem with my program. I thin we must instantiate the TDP [] method in the Action Event in your case , and not in the constructor of the window. Here, it is recognized. It will not be initialized with each new manip menus. I guess I am correct here. I'm really a conflicted between the code and the abstract classes. So, I can not say what exactly is the solution for this. Still , I will try on it and if i found a solution for this then I will post back. |
#4
| |||
| |||
Re: Table and abstract classes Hello, I think you can try to create a clone () method in your object val. Code: protected val clone() { val v = new val(); v.setRotVal(RotVal); v.setSymXVal(SymXVal); return v; } Code: v.setRotVal(RotVal); v.setSymXVal(SymXVal); Code: val v = new val(); v.setRotVal(RotVal); v.setSymXVal(SymXVal); TDP[i] = Vt.clone(); Last edited by cyber-noob : 03-03-2010 at 10:50 AM. |
#5
| |||
| |||
Re: Table and abstract classes Hello, I think it's in the design of these tables of values that the problem is in effect. One can easily instantiate a Val, do (during the ActionEvent method): Code: val v = new val(); v.setRotVal(RotVal); v.setSymXVal(SymXVal); |
#6
| |||
| |||
Re: Table and abstract classes Hello, I think you can try the following code Code: ... Public class val { ... protected val clone() throws CloneNotSupportedException { val v = new val(); v.setRotVal(RotVal); v.setSymXVal(SymXVal); return v; } ... } |
![]() |
|
Tags: abstract class, columns, database, fields, interface, records, rows, table |
Thread Tools | Search this Thread |
|
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Difference between Abstract classes and Interfaces in C# | Gallard | Software Development | 8 | 21-05-2012 11:58 AM |
Link a Table to another Table to Drop Down In Main Table | himeshRES | Windows Software | 6 | 11-12-2010 02:01 PM |
Sort a table for several classes | New ID | Software Development | 5 | 13-02-2010 04:19 AM |
Use of abstract classes | ScarFace 01 | Software Development | 5 | 25-01-2010 09:07 AM |
Abstract Classes in PHP5 | nonose | Software Development | 2 | 16-06-2009 02:33 PM |