• Post Reply Bookmark Topic Watch Topic
  • New Topic

JavaBean persistence or Serialization?

 
Girish Vasmatkar
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

Here is the question :

I have a JPanel with a JButton on it to invoke a JFileChooser which prompts the user for an image file to be appended as icon on a JLabel and a simple text for a JLabel. So now what I want is when I restart the application that image and the label should be shown as part of the JPanel. I know this can be done using JavaBean persistence or serialisation. My question is which way I should go? I mean should I use simple Serialisation or to use JavaBean persistence. Or is there any better way to do this?
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would probably use the Preferences API.

http://java.sun.com/javase/6/docs/technotes/guides/preferences/overview.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!