|
|
|
Возможно ли заставить?
|
|||
|---|---|---|---|
|
#18+
Имеем класс: public class Frame1 extends JFrame implements ActionListener { ........ JTextArea jTextArea = new JTextArea(); //Разместили следующий Bean: Panelka panelka = new Panelka(); ......... public void actionPerformed(ActionEvent e) { jTextArea.append(e.getActionCommand() + "\n"); .......... } } ================================================================= public class Panelka extends JPanel { public synchronized void addActionListener(ActionListener l) { ......... } protected void fireActionPerformed(ActionEvent e) { ........... } public void jButton_actionPerformed(ActionEvent e) { frame1 = new Frame1(); addActionListener(frame1); String message = "Hello!"; ActionEvent event = new ActionEvent(this, 1, message); fireActionPerformed(event); } } ================================================================= Возможно ли заставить реагировать Frame1 на события от Panelka? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 04.07.2006, 11:33 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33829581&tid=2148784]: |
0ms |
get settings: |
8ms |
get forum list: |
21ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
202ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
38ms |
get tp. blocked users: |
1ms |
| others: | 232ms |
| total: | 521ms |

| 0 / 0 |
