Why XMLEncoder behave like this

following is my code, can someone check this and tell me whats wrong in this, because if use any inner class / outter class as a object for my JComboBox, this will not encode with giving panel.
//===================================================================
package com.ju.pdfpad;
import javax.swing.*;
import java.io.*;
import java.awt.event.*;
import java.beans.XMLEncoder;
import java.beans.XMLDecoder;
public class Test extends JFrame implements Serializable {
  public JComboBox c;
  public JPanel p;
  //============================================================================
  public Test() {
    setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    p = getJPanel();
    if( p == null ){
      System.out.println( "null" );
      p = new JPanel();
      Object[] data = { new Integer(1), new Integer(2), new Integer(3) }; // if i use this, encoding fine
      //Item[] data = { new Item(1,"a"), new Item(2,"b"), new Item(3,"c") }; //but if i use this, then inner class will not encode
      c = new JComboBox( data );
      p.add( c );
    getContentPane().setLayout( new java.awt.FlowLayout() );
    getContentPane().add( p );
    addWindowListener( new WindowAdapter(){
      public void windowClosing( WindowEvent we ){
        encodePanel();
    pack();
  //============================================================================
public class Item implements java.io.Serializable {
  public int x;
  public String str;
  public Item(){}
  public Item( int x, String str ){
    this.x = x;
    this.str = str;
  public void setX( int x ){
    this.x = x;
  public int getX(){
    return this.x;
  public void setStr(){
    this.str = str;
  public String getStr(){
    return this.str;
  public String toString(){
    return this.str;
  //============================================================================
  private JPanel getJPanel(){
    try{
      XMLDecoder d = new XMLDecoder( new BufferedInputStream(new FileInputStream("panel.xml")) );
      Object pBox = d.readObject();
      if( pBox != null ){
        p = ( JPanel )pBox;
      d.close();
      return p;
    }catch( FileNotFoundException fnfe ){
      fnfe.printStackTrace();
    }catch( NullPointerException npe ){
      npe.printStackTrace();
    }catch( Exception e ){
      e.printStackTrace();
    return null;
  //============================================================================
  private void encodePanel(){
    try{
      XMLEncoder e = new XMLEncoder( new BufferedOutputStream(new FileOutputStream("panel.xml")) );
      e.writeObject( p );
      e.close();
    }catch( FileNotFoundException fnfe ){
      fnfe.printStackTrace();
    }catch( Exception e ){
      e.printStackTrace();
  //============================================================================
  public static void main(String[] args) {
    new Test().setVisible( true );
  //============================================================================
}

Try the following steps,
Sign into your computer and removal of credit card information. Here are the steps:
1) Open iTunes and sign in to the iTunes Store.
2) Select "View My Account" from the Store menu.
3) Enter your password and click the View Account button.
4) Click the Edit Payment Information button.
5) Select "None" as the payment type.
6) Click the Done button at the bottom of the page.
Reset your account password from the following link:
http://iforgot.apple.com
Phase 3:
Download a free content on to get recognized in iTunes.
To ensure your account is functioning, try downloading a free item from the iTunes Store. To do this, navigate to the iTunes Store main page by clicking the Home icon near the upper-left corner of the window. Scroll down and click the "FREE ON iTunes" link near the bottom of the main page, then select an item to download.
After you are able to download the free App try updating the billing information as usual.

Similar Messages

  • Itunes asking me my billing verification again and again on the same computer. I don't know why it behave like this. Anyone can solve my problem?

    Itunes asking me my billing verification again and again on the same computer. I don't know why it behave like this. Anyone can solve my problem?
    I already provided my 3 digit CVV number but Itunes again need to confirm the code whereas on my Office Computer I am purchasing Apps on Itunes without verifying my billing information again and again except once at the time of creation of account.
    Please help me as I am charging by my Credit Card bank by US$ 1 each time when I give verification code.
    Thanks
    Talat Khatri

    Try the following steps,
    Sign into your computer and removal of credit card information. Here are the steps:
    1) Open iTunes and sign in to the iTunes Store.
    2) Select "View My Account" from the Store menu.
    3) Enter your password and click the View Account button.
    4) Click the Edit Payment Information button.
    5) Select "None" as the payment type.
    6) Click the Done button at the bottom of the page.
    Reset your account password from the following link:
    http://iforgot.apple.com
    Phase 3:
    Download a free content on to get recognized in iTunes.
    To ensure your account is functioning, try downloading a free item from the iTunes Store. To do this, navigate to the iTunes Store main page by clicking the Home icon near the upper-left corner of the window. Scroll down and click the "FREE ON iTunes" link near the bottom of the main page, then select an item to download.
    After you are able to download the free App try updating the billing information as usual.

  • Why is my iPod behaving like this?

    My iPod Touch 4th generation keeps popping up Voice Command by itself and keeps stopping and adjusting the volume by itself. Why is it doing this? There's absolutely no damage to it....I haven't dropped it and there's no water damage

    Did you already try to reset it by holding the sleep and home button until the Apple logo comes up again? If this does not work, restore "as new ipod" without using the backup, in case it contains corrupt files.

  • TS5362 Why would something like this happen?

    The article worked, but I would like to know how something like this happens?

    thats called tabbed divs or tabbed content
    http://www.menucool.com/tabbed-content
    find lots of ways to use it on Google and even tuts to hand code it

  • Why screen look like this?, why screen look like this?

    went like this a week ago. cut it off. enventually cut back on and screen work. phone went dead today, plugged in charger and the screen came up like this again. this time tried cutting off and on but screen wont start back working.

    As you seem to be having difficulty posting the image, perhaps you can try to describe what you're seeing.
    Best of luck.

  • Why does Mail behave like this?

    More often than not, when I try to either respond to an email, or generate a new one, Mail just hangs. It will continue to do this until either 1) it finally gives up and says to select another server, or 2) I quit Mail, then open it again, at which point the outgoing mail swooshes away like it should have the first time. I would say this happens 8 out of 10 times.
    The other thing that's driving me nuts is servers I have deleted from the server list keep coming back. I've tried repairing permissions right after deletion, but that doesn't help.
    These two issues come together when I let Mail continue to try to send while it hangs, then it pops up and tells me it can't do it with that server, try another... and the servers I've deleted are back on the list again; sometimes, Mail has tried to use one of the re-appearing servers, or it'll offer one of them as an option.
    THis is maddening. Anyone have an idea how I can get these things to stop?

    Hi Dave, missed this apparently, thanks for bumping it up again.
    On the Mail problem, Not certain, but this can fix myriad Mail problems...
    Safe Boot from the HD, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, then move these folder & file to the Desktop.
    Move this Folder to the Desktop...
    /Users/YourUserName/Library/Caches/Mail/
    Move this file to the Desktop...
    /Users/YourUserName/Library/Mail/Envelope Index
    Reboot.
    On the Server issue, are they listed in Accounts>Login Items, or set to Automount?

  • I didn't know Macs behaved like this...

    Hey everyone,
    I never thought I'd come to a day where a PC would be more reliable than a Mac but I guess this is the reality. I purchased my unibody Macbook approx. 2 years ago. It's had the odd crashes, applications crashing one after another etc but nothing like I've experienced a few days ago.
    As I was working, all of a sudden my open applications started crashing one after the other (imaging editing software, Firefox, and then Finder). Everything started going crazy, kernel panics, would get stuck at grey startup screen indefinitely.
    I decided to try and see what was wrong so tried verifying and repairing the HD, there were no problems reported. Verified and repaired permissions, some problems detected and fixed. This didn't help, it kept hanging at the startup screens, going in and out of states, like the screen would flash up like it was shutting down, then coming back to the desktop. It was going crazy.
    I started it in Safe Mode a couple of times, was OK but then when you start normally, you'd get kernel panics, not leading to anything but frustration. I decided to get all my files off and reinstall OSX. I did this, and sometimes it would hang or I'd get kernel panics and it wouldn't install properly and have to be forced to shut down. I did manage to fully install it once but then again, a kernel panic happened. Basically, I tried to reinstall OSX a few times and try get it to work but there is this reccuring problem with kernel panics not allowing for progress. Some people suggest it's something wrong with the RAM. I've never forced something to shut down so many times because it just wouldn't go after 30 mins.
    So what have I tried?
    Hardware test at startup - no reported problems
    Resetting the RAM at startup
    Reinstalling OSX
    Verified repaired permissions
    Verified and repaired disk
    I'm just so disappointed in Mac now. And frustrated. I never in a million years thought this day would come, when I expect reliabilty from a machine. Maybe this is why they only give 1 year warranty because after 2 years it could go kapot at any minute...Deeply disappointed.
    Anyway, I hope someone can give me an insight at least. Thanks a lot.

    If you can do so then I would try erasing the hard drive then installing Snow Leopard from scratch.
    Drive Preparation
    1.  Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    If the drive is still working properly then the above will repair any soft defects on the drive. If all is OK then quit DU after formatting and return to the installer. Install OS X. If there are still panics then take it in for repair.

  • Why filterFunction acts like this?

    I'm using a filter function with my arrayCollection list as this way:
    // attaches filter function
    collection.filterFunction = filterCollection;
    collection.refresh();
    private static function filterCollection( item:Object ) : Boolean {
      return item[_searchField].match( new RegExp(_searchString, "i") );
    This usually makes sense of "search any character". So what should expected to get in a search when I search something with a quoted string like: "my some string". But by adding quotes filter function returns nothing; but when I removes the quotes from that string it returns the proper result. If the said regExp makes the concept of "Search any character", then why not the result also come up even when I add quotes.
    And if possibly how should I get rid of this - getting the result even its added with quotes.

    Quotes in a search string affect what will be searched for.  This sounds
    more like a RegExp question than a filter function question.
    Run some tests with RegExp and look at the doc and examples for how it
    works.

  • Sometimes when I tried to selecting a game from my folder in my iphone 5, it will jump out and back to the home page. Why is it like this?

    Why is it when sometimes I tried to select a game to play on my iphone, it jumps out back to my homepage?

    Hi lammyrock,
    I want to let you know to be patient as this troubleshooting can take some time depending on many different. First try putting your iPhone into recovery mode and then use iTunes to restore it. To do that, you can that by making sure that your iPhone is turned off, hold the Home button down while it is plugged into iTunes. You should get the graphic on your iPhone to plug it into iTunes and iTunes should prompt you to restore it. Once that is done and if you have a back up in iTunes or in iCloud, then you can put that back on after the restore is complete. Take a look at the article below for more information to help you. 
    If you can't update or restore your iPhone, iPad, or iPod touch
    http://support.apple.com/en-us/HT201263
    Hope this helps,
    -Norm G. 

  • Should my UL behave like this?

    Ok this is not really a "problem question" but more of a
    general "is this element behaving correctly?" question..
    I have created a new masthead section for my site, and have
    used a right-floated UL called "rightlist" with a background image.
    The UL uses padding-bottom of 46px to make the image appear fully.
    Using the padding-bottom causes the UL to "overlap" the DIV's
    positioned directly below and allows for a nice fluid layout.
    My question is - Should the UL with the padding-bottom of
    46px be overlapping the DIV below? I always thought it should
    "push" the div lower down and not overlap. But I am happy with it
    doing the overlapping becuase it is giving me the effect I want to
    acheive!
    I have highlighted the top right-floated UL with the image in
    GREEN border, and the DIV in BLUE border so you can see what I mean
    UL example

    ~Billy~ wrote:
    > Ok this is not really a "problem question" but more of a
    general "is this
    > element behaving correctly?" question..
    >
    > I have created a new masthead section for my site, and
    have used a
    > right-floated UL called "rightlist" with a background
    image. The UL uses
    > padding-bottom of 46px to make the image appear fully.
    Using the padding-bottom
    > causes the UL to "overlap" the DIV's positioned directly
    below and allows for a
    > nice fluid layout.
    >
    > My question is - Should the UL with the padding-bottom
    of 46px be overlapping
    > the DIV below? I always thought it should "push" the div
    lower down and not
    > overlap. But I am happy with it doing the overlapping
    becuase it is giving me
    > the effect I want to acheive!
    >
    > I have highlighted the top right-floated UL with the
    image in GREEN border,
    > and the DIV in BLUE border so you can see what I mean -
    >
    >
    http://www.siteoftom.com/example.html
    >
    To see what you expect to see, try adding height: 46px; to
    that rule -
    now you see what is happening?
    Now make the padding for this rule - padding: 0; :-)
    HTH
    chin chin
    Sinclair

  • Why is it like this

    Why is peazip reading only 2047 MB of RAM and my task manager reads 2558 MB?
    I have this board 945GCM5-F V2 Board and it has the latest bios update to support up to 4GB of RAM.
    See my facebook page for the disambiguation page that I'm talking about:
    http://www.facebook.com/johncyrilleadamsong/photos_albums#!/media/set/?set=a.424940037568142.95657.100001564478361&type=3
    I'm just worried that the BIOS update did not take effect and that the other three pictures here does't display the icon 'setup-dvd-ripper-lite.exe' its just a blanc circle in these views but in large icons ok.
    Please help

    My video card is MSI 7600GT 256MB DDR3
    And the website for the application is here
    >>>http://www.videoconverterfactory.com/freeware-download.html<<<
    Scroll down and look for 'free dvd ripper' (first row first column in blue hyperlink download)
    download that and try to view it in:
    >small icons
    >lists and
    >details
    you'll see a blanc circle with an outline on it.
    Could it be that Windows can not render this type of icon and reach its limits?!  Other views ok.
    Help please and thanks.

  • I have FF 29.0.1 installed on Win7x64. Scale on clrl+0 (100%) , but it makes everything BIGGER!!! All sites displays bigger! Why it work like this?

    What i have to do for it be 100% and displays all sites normal, like all other browsers???

    Try to use Firefox hot keys;
    '''<Control> + (plus)''' = Zoom Bigger<BR>'''<Control> - (minus)''' = Zoom Smaller<BR>
    '''<Control> 0 (zero)''' = Reset Zoom
    You might want to check out;
    '''''[https://addons.mozilla.org/en-US/firefox/addon/nosquint/?src=external-Add-ons_Manager_Context_Menu-extension NoSquint]''''' {web link}<BR>
    NoSquint allows you to adjust the text-only and full-page (both text and images) zoom levels as well as color settings both globally (for all sites) and per site.

  • Why we use like this?

    Hi
    In a sample coding of tutorial i saw the following lines. There what is the purpose of <String>?
    Can anybody explain me ?
    List<String> list = new ArrayList<String>(c);Thanks you so much.

    that's called generics, a new feature in java 1.5. used to be available as a library called Pizza. it gives us added compile-time type safety
    basically, before they were introduced, Collections would always return java.lang.Object references, and you had to cast the returned value to the correct type. with generics, you can avoid all that. in your posted example, the list can be reasonably trusted to contain Strings, and get(int) will return a String, rather than an Object. see below
    List < String > list = new ArrayList < String > ();
    list.add("hello");
    String a = list.get(0);see how the collection just returned a String, rather than an Object? the feature isn't limited to collections, you can write your own parameterized classes and interfaces. too much for me to go into here, but there are plenty of tutorials - and a whole forum here dedicated to them.
    finally, I said above that you could reasonably trust the collection to hold the right types. that's because there are ways around the mechanism, largely because the extra type information doesn't exist at runtime. it's not too hard to fool the system
    List < String > list = new ArrayList < String > ();
    List theList = list;
    theList.add(new Socket());
    String a = list.get(0); //ClassCastException at runtimeget hold of a tutorial, it'll explain it much better than I just did

  • The card we are using to pay for purchases is a english card registered to a spanish address, but when we try to purchase a movie on apple tv it says it is not available on a spanish registered card. Does anyone have any suggestions why it's like this?

    Help Please!!

    Welcome to the Apple Community.
    Which store are you trying to use. I believe you need to use the store in the country in which your credit card is registered.

  • Why are my pictures like this????

    I used to have a Dell laptop before getting a MacBook Pro. When I took it into my college's computuer store to be fixed one time, I received it back with all my photos on the harddrive ruined. The pictures themselves were not distorted but portions of the photo had different hues (ex., one half would be normal and then another half had a yellow hue). The lines marking the two parts could go in any direction and any hue color has happened. The store told me unfortunately there was nothing I could do. Even the thumbnails of the photos were showing this problem.
    However, when I transferred all my photos over to my MacBook Pro, I realized that although the color distortions were still there, the thumbnails were perfectly fine and not indication there was a problem. Is there any way to restore my photos from the thumbnail image, and why are they like this in the first place?!?!?!?
    Thank you!

    Its stuff like Adobe Reader (ex...Documents and Data = 8.5MB, but on Usage tab it reflects 17.1 MB and I have nothing saved there).   Other stupid things like a Flashlight I downloaded months ago. It too reflects Documents and Data = 1.7MB but the usage tab reflects 7.0MB.  Again I get and understand the games and apps where I have a profile saved with info, but the two examples above is more concerning and I have quite a few more apps just like it.

Maybe you are looking for

  • Bridge CC - Cannot Open Files following Uninstall of Previous Version

    I recently updated to Creative Cloud (Windows 7). Today I unstalled CS6. Following the uninstall, I can no longer open a .psd, .ai or .indd file from Bridge CC. I receive an error from Windows that the CS5 version of Photoshop, Illustrator or InDesig

  • STP Configuration for SG300/SF300

    I have configured RSTP on a set of switches I managed and just want to confirm I have done this correctly. These switches are used within a business centre all in L2 mode with around 30 VLANs to keep each suites traffic seperate along with VoIP and w

  • Cant uninstall or install Photoshop CS3

    The setup.exe pops up in task manager and can stay there doing nothing until I shut it down but it doesn't do anything, could it be Windows sp3?

  • Tweening assistance needed

    Hello I've been asked to re-design this website http://www.tandp-dancewear.co.uk/ but the client still wants to keep the tweening effect of the images merging into one another. Can anyone point me in the direction of a decent tutorial or some tips on

  • HELP! Export tracks of a multitrack project produces equal track file lengt

    Hi, i have a problem with multitrack projects. I have one aiff file open on track 1, then split it and spread the parts each on one individual track. I then want to export the project. In this stage a folder with one file for each track is created. T