Search:

Type: Posts; User: javapenguin

Search: Search took 0.09 seconds.

  1. Re: Can't get it to save stuff with JFileChooser

    Wait, can I get it to write an entire program, like have a small program, then have, in another file in the Eclipse project, write the first class into the ObjectOutputStream?

    Is that what you...
  2. Re: Can't get it to save stuff with JFileChooser

    import java.awt.color.ColorSpace;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.AdjustmentEvent;
    import java.awt.event.ItemEvent;
    import...
  3. Re: Can't get it to save stuff with JFileChooser

    How do you get an object to implements the Serializable interface?

    I have the entire class implementing Serializable.

    Anyway, Serializable has no methods.

    Also, so far it appears all of my...
  4. Re: Can't get it to save stuff with JFileChooser

    java.io.NotSerializableException: java.io.ObjectOutputStream
    at java.io.ObjectOutputStream.writeObject0(Unknown Source)
    at java.io.ObjectOutputStream.defaultWriteFields(Unknown Source)
    at...
  5. Re: Can't get it to save stuff with JFileChooser

    So do you use writeObject() to serialize it?

    If not, how do you serialize it?
  6. Re: Can't get it to save stuff with JFileChooser

    I know I use ObjectInputStream and FileInputStream

    but what method?

    I tried using an ObjectInputStream.readObject() but it doesn't appear to do what I want.

    Perhaps I need to get it to...
  7. Re: Can't get it to save stuff with JFileChooser

    Ok, but how do you get it to read the objects back in?

    I gave a sample program.

    >:D<\:D/^:)^^:)^[-O<[-O<=D>=D>:-t:-t:-t~X(~X(:-bd#-o
  8. Re: Can't get it to save stuff with JFileChooser

    I have no clue what sort of file a regular GUI would be compatible with. I tried .rtf and it gave me just a Word doc with code, though it wasn't the same code, exactly anyway, that I had used to...
  9. Re: Can't get it to save stuff with JFileChooser

    I thought I could actually, but I could only if I serialized all of the fields and all the fields it inherited.

    So how do you write Objects that aren't serializable?
    ...
  10. Re: Can't get it to save stuff with JFileChooser

    And if it isn't an instance of Serializable, does that mean I can't use it? If I can use it, what did you mean by "fields"?
    ...
  11. Re: Can't get it to save stuff with JFileChooser

    What do you mean that I have to include all of the fields that get inherited? Also, can it only be saved once and not saved over? What's not forward compatible? By fields, do you mean if I have a...
  12. Re: Can't get it to save stuff with JFileChooser

    What do you mean previously saved files may not be forward compatible? Are you saying that once saved, the user can't keep saving over it and updating it?


    import java.awt.color.ColorSpace;...
  13. Re: Can't get it to save stuff with JFileChooser

    Is there a way I can add the Components to the saved version? How do you Serialize something?

    Suppose I have a JPanel, which has a title as class extends JFrame, a JTextArea, and a couple of...
  14. Re: Can't get it to save stuff with JFileChooser

    I want the everything to be there. For instance, make a JTable, add text to it, hit save, and then load it and have the text still in it. Plus I wouldn't mind having the background and the JPanel...
  15. Can't get it to save stuff with JFileChooser

    I don't know how to get the FileWriter to get the text typed in the file name area in the JFileChooser, and it never saves the file, or, if it does, it doesn't save anything and the file keeps...
Results 1 to 15 of 15