Results 1 to 4 of 4
  1. #1
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Post Error in writing JButton Array of objects into File

    Hello Guys I hope u all r f9

    I have problem to writing an two dimension array Of object of JButton in a file by using Serializable
    but i'm getting exception

    java.io.NotSerializableException: javax.swing.GroupLayout

    here is my code

    JButton b[][]=new JButton[6][6];
    initializating code....

    FileOutputStream fileOut=new FileOutputStream("JButton.DAT");
    ObjectOutputStream objectOut=new ObjectOutputStream(fileOut);
    objectOut.writeObject(b);
    objectOut.close();
    fileOut.close();


    please help...

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default

    Quote Originally Posted by justbeller View Post
    Hello Guys I hope u all r f9
    Recommended reading: How To Ask Questions The Smart Way

    To get better help sooner, post a SSCCE that clearly demonstrates your problem. Not uncompilable code snippets. Also, use the code tags to post code.

    db

  3. #3
    justbeller is offline Member
    Join Date
    Dec 2010
    Posts
    57
    Rep Power
    0

    Default

    what I ask just on this question if you dont know than dont reply.

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    I don't think that your question gives enough information to be answerable (at least not for me), and that's what Darryl was getting at. Please check the links that he's provided as they'll help you to see what information we need in order to be able to help you.


    Quote Originally Posted by justbeller View Post
    what I ask just on this question if you dont know than dont reply.
    A couple of points:
    • You can't control who responds or doesn't to your posts. The only exception is if someone is being abusive then report them.
    • I wouldn't put that "if you don't know then don't reply" in my post. Again, you may not be giving us enough information and so if you restrict replies to only those "who know", you may get no replies at all. Also, you'll possibly upset others who "do know" and they may not want to reply to you.
    • His links will help you get better replies if you take them the right way and use the information they contain to help you write better questions.


    Much luck!

Similar Threads

  1. writing string array in to a file
    By abdullahansari in forum New To Java
    Replies: 13
    Last Post: 08-29-2010, 05:25 AM
  2. error encountered when writing image file
    By angelinehelena in forum Advanced Java
    Replies: 1
    Last Post: 02-10-2009, 11:08 AM
  3. Logic Error: Not Writing To File
    By JDCAce in forum Advanced Java
    Replies: 6
    Last Post: 10-21-2008, 03:13 AM
  4. Writing a countdown array to a file.
    By kewlgeye in forum New To Java
    Replies: 6
    Last Post: 05-25-2008, 07:09 AM
  5. Reading/Writing a File using byte array
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-16-2008, 11:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •