Re: Accessing the associated dataModel when a particular frame is selected

From: ak (spam_at_imagero.com)
Date: 12/31/03

  • Next message: Craig: "Refresh / repaint Problems AFTER Installing JRE"
    Date: Wed, 31 Dec 2003 17:41:48 +0100
    
    

    > In line with the MVC architecture of Swing, it appears as if I am
    > trying to get to the model through the view rather than keeping the
    > model separate.
    because your users interact with view, not with model.

    create something like this:

    public class JTableInternalFrame extends JInternalFrame {

        JTable table;

        public JTableInternalFrame (JTable table) {
            this.table = table;
            getContentPane().add(new JScrollPane(this.table));
            addInternalFrameListener(new InternalFrameAdapter() {
                public void internalFrameActivated(InternalFrameEvent e) {
                    //add row here
                }
            }
        }
    }

    ____________

    http://reader.imagero.com the best java image reader.


  • Next message: Craig: "Refresh / repaint Problems AFTER Installing JRE"

    Relevant Pages

    • Re: Special button with red background color when pressed
      ... > I trying to put a special button in a swing application, ... > have a red background when pressed. ... may be AbstractButton#setPressedIcon(Icon icon) could help you... ... http://reader.imagero.com Java image reader ...
      (comp.lang.java.gui)
    • Re: JScrollPane and refresh
      ... swing make it for you. ... Andrei Kouznetsov ... http://uio.dev.java.net Unified I/O for Java ... http://reader.imagero.com Java image reader ...
      (comp.lang.java.gui)
    • Re: How does JTabbedPane actually work?
      ... yep, you miss TabbedPaneUI, BasicTabbedPaneUI, MultiTabbedPaneUI, ... you should read more about swing. ... http://reader.imagero.com the best java image reader. ...
      (comp.lang.java.gui)