Buttons and Java Frames

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnnetteB
    New Member
    • Oct 2007
    • 10

    #1

    Buttons and Java Frames

    I am trying to open a java frame on the click of a button from a main java screen to enable a file to be written to it and edited. I can get the button to open notepad, but can't get it to open a frame. Can anyone help ??

    Many thanks.

    Annette
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by AnnetteB
    I am trying to open a java frame on the click of a button from a main java screen to enable a file to be written to it and edited. I can get the button to open notepad, but can't get it to open a frame. Can anyone help ??

    Many thanks.

    Annette
    Why do you want to display that other JFrame then? You already opened notepad
    that took care of the editing and all. What is that other JFrame supposed to do?

    kind regards,

    Jos

    Comment

    • AnnetteB
      New Member
      • Oct 2007
      • 10

      #3
      Originally posted by JosAH
      Why do you want to display that other JFrame then? You already opened notepad
      that took care of the editing and all. What is that other JFrame supposed to do?

      kind regards,

      Jos
      I am trying to open an existing document that is in a separate frame that can be copied, with a frame below that can be edited. Both are then appended to a file. So basically it will be two frames, one that a document gets opened into (uneditable) and one that can have text pasted into and then both appended to a file. I can't get notepad to do what I want it to do so was going to scrap Notepad and start again with Frames, but can't get a frame to work from the button?? Any help would really be appreciated. I may be overcomplicatin g this but am very new to Java and this project has to be in Java....!!

      thanks.

      Annette

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by AnnetteB
        I am trying to open an existing document that is in a separate frame that can be copied, with a frame below that can be edited. Both are then appended to a file. So basically it will be two frames, one that a document gets opened into (uneditable) and one that can have text pasted into and then both appended to a file. I can't get notepad to do what I want it to do so was going to scrap Notepad and start again with Frames, but can't get a frame to work from the button?? Any help would really be appreciated. I may be overcomplicatin g this but am very new to Java and this project has to be in Java....!!

        thanks.

        Annette
        Perhaps you should have a look at JTextComponents .
        You can read all about it here.

        Comment

        Working...