Models in Swing.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    Models in Swing.

    Now a days I am working in Swing.
    So guys please help me to do my project.
    Actually the time is short to read out those things.

    What i have a confusion ..that .....

    [code=java]
    DefaultTableMod el tab_model = new DefaultModel(.. .);
    JTable tab = new JTable(tab_mode l);
    //Now if I change to tab_model then automatically updation notification goes to tab??
    [/code]

    Debasis Jana.
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by dmjpro
    Now a days I am working in Swing.
    So guys please help me to do my project.
    Actually the time is short to read out those things.

    What i have a confusion ..that .....

    [code=java]
    DefaultTableMod el tab_model = new DefaultModel(.. .);
    JTable tab = new JTable(tab_mode l);
    //Now if I change to tab_model then automatically updation notification goes to tab??
    [/code]

    Debasis Jana.
    Why don't you just try it if you don't want to read? Are you planning to ask every
    little Swing issue here just because you don't want to read the API documentation?
    It'll cost you a lot more time to produce anything sensible then.

    btw, not supplying a TableModel makes the JTable produce its own DefaultTableMod el.

    kind regards,

    Jos

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      Originally posted by JosAH
      Why don't you just try it if you don't want to read? Are you planning to ask every
      little Swing issue here just because you don't want to read the API documentation?
      It'll cost you a lot more time to produce anything sensible then.

      btw, not supplying a TableModel makes the JTable produce its own DefaultTableMod el.

      kind regards,

      Jos

      What I guessed that's right ...if i change to Model then it reflects to that corresponding table.

      Debasis Jana

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by dmjpro
        What I guessed that's right ...if i change to Model then it reflects to that corresponding table.

        Debasis Jana
        Don't play guessing games with the compiler. Just refer to the API docs.

        Comment

        • JosAH
          Recognized Expert MVP
          • Mar 2007
          • 11453

          #5
          Originally posted by r035198x
          Don't play guessing games with the compiler. Just refer to the API docs.
          I normally fall asleep with my nose on the keyboard. When I wake up I expect to
          see the most beautiful code. If there isn't any I fall asleep and try again :-)

          kind regards,

          Jos

          Comment

          • SammyB
            Recognized Expert Contributor
            • Mar 2007
            • 807

            #6
            > fall asleep with my nose on the keyboard. When I wake up I expect to
            see the most beautiful code. If there isn't any I fall asleep and try again :-)

            This works just like evolution -- you just need to try for a longer period of time. ;o)>>> Sam

            Comment

            • JosAH
              Recognized Expert MVP
              • Mar 2007
              • 11453

              #7
              Originally posted by SammyB
              > fall asleep with my nose on the keyboard. When I wake up I expect to
              see the most beautiful code. If there isn't any I fall asleep and try again :-)

              This works just like evolution -- you just need to try for a longer period of time. ;o)>>> Sam
              I can't do that, I mean I have to go to bed at night, I need my sleep too you know!

              kind regards,

              Jos ;-)

              Comment

              Working...