|
|
|
Возможно ли заставить?
|
|||
|---|---|---|---|
|
#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=33830773&tid=2148784]: |
0ms |
get settings: |
11ms |
get forum list: |
19ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
206ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
50ms |
get tp. blocked users: |
1ms |
| others: | 238ms |
| total: | 546ms |

| 0 / 0 |
