JTabbedPane and Serialization

Hi, I want to Serialize a JTabbedPane to a file but I am experiencing lots of problems :
Firstly, I get an exception :
java.io.NotSerializableException: javax.swing.plaf.basic.BasicTabbedPaneUI$MouseHandler
I can override this in out custom plaf, but then this throws out pluggable look and feel. Is there any other way I can fix this ....
Also I have had to change lots of code to get these to Serialize e.g cutomizing the BasicTabbedPaneUI and other classes to implement Serializable, and I get a bizarre problem where I write my Swing JxInternalFrame to disk, and then when I goto dispose of it, it throws a completely different Exception in firePropertyChanged within JTabbedPane.
It tries to cast a JTabbedPane within the class BasicTabbedPaneUI$PropertyChangeHandler and the source is a Viewport... If I remove the Serialize to Disk code, then this does not occur!
I am a little baffled why this happens ... can anyone help?

My objective is to Serialize out the JxInternalFrame with all it's components to disk.
We have an Application that Dynamically creates GUI interfaces using XML. Instead of creating the JxInternalFrame and all its components from the XML String, I thought it would be quicker to Serialize the Object to disk and re-read once the Frame once it had initialliy been built, for caching purposes.
It takes about 4 seconds to build a 6MB JxInternalFrame with all its components (JTabbedPanes, JTextFields, JCombos etc....), and I want to minimise this to be almost instant ... i.e as if using JInternalFrame.setVisible( true or false ).
I have not looked at XMLEncoder/Decoder yet, I will have a look and see if this will help or if this is fast enough.
Bare in mind I could be opening a Screen many times, but do not want to initiate it again from raw XML AND I do not want to store Huge objects in memory.

Similar Messages

  • JTabbedPane and InsertTab method

    Hi at all!!!Sorry for my bad english!!
    For a university project I want to implement a copy of notepad. Only I want to manage a more document and I think that it is possible through the JTabbedPane and it works.
    But I don't know how I can implement a button that add/remove a tab during the runtime.
    Is there someone that can help me???
    thank u
    giuliano

    Your main window should have [AddNewTab] and [RemoveTab] buttons.
    In their event handler, launch a dialog and accept required user inputs.
    After you dispose the dialog, call JTabbedPane#add(), addTab() or remove().

  • JTabbedPane and removeTabAt() method

    Hello,
    I use in my application a JTabbedPane and i want allow the user to remove a tab of this JTabbedPane. When the JTabbedPane change i need to perform some traitement.
    So i use a ChangeListener to be informed of all changes of my JTabbedPane.
    But, when i removed a tab which is not in last or first position i'm not informed by the change.
    Thanks for your help.
    Guiguch

    I had the same problem. I fixed it by overriding the remove() method to fire a StateChanged event:
    tabbedPane = new JTabbedPane()
         public void remove(int tab)
              super.remove( tab );
              int after = getSelectedIndex();
              //  The selected tab remained the same after this remove, consider
              //  it a state changed
              if (after == tab)
                   fireStateChanged();
    };

  • Drag and Drop questions and Serialization in the 1Z0-852 Upgrade exam?

    Hi,
    Does anyone know if the drag and drop items and serialization have been removed from the 1Z0-852 Java SE 6 Programmer Certified Professional UPGRADE exam?
    I know that they have been removed from the 1Z0-851, but not sure about the upgrade exam.
    Thanks in advance,
    Alvaro

    Alvaro wrote:
    Hi,
    Does anyone know if the drag and drop items and serialization have been removed from the 1Z0-852 Java SE 6 Programmer Certified Professional UPGRADE exam?
    I know that they have been removed from the 1Z0-851, but not sure about the upgrade exam.
    Thanks in advance,
    Alvaro(1) Drag and Drop
    .... this question format will have been removed:
    Ref: http://blogs.oracle.com/certification/entry/0596
    (2) Serialization:
    It is best to compare the topics from your notes to the current topics, however according to my reading of the current topics it is in scope at least to some extent:
    http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getpage?page_id=41&p_exam_id=1Z0_852 (Section 3 API Contents):
    Develop code that serializes and/or de-serializes objects using the following APIs from java.io: DataInputStream, DataOutputStream, FileInputStream, FileOutputStream, ObjectInputStream, ObjectOutputStream and Serializable.

  • Marshall and Serialization

    Hello There:
    Can any one please educate me the difference between marshaling an object and serialize an object. They looked the same to me. they both flat the object to a readable format and maintain the state of the object. What's the difference, why both terms are used. Where do I find the definition of 'marshal'? Thank you very much!
    -RM

    Please search the web for general questions. But we'll let you slide this time. Here's what my search turned up:
    http://forum.java.sun.com/thread.jspa?threadID=616673&messageID=3436144
    http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=1&t=009261
    ...if you want more just google:
    http://www.google.com/search?q=marshalling+vs.+serialization

  • Entry processor performance and serialization

    Our application invokes an entry processor from a .Net extend client. We are seeing very poor performance the first few times the processor is invoked (typically 60ms vs 2ms). I was expecting this to be due to the overhead of the initial TCP connection but this doesn't appear to be the case. Here is a typical set of timings from the beginning of invoking the EP on the client:
    5ms: Object starts being deserialized on proxy
    7ms: Deserialization is finished, and serialization begins
    9ms: Serialization is complete.
    55ms: Deserialization begins on the storage node
    58ms: Deserialization complete on storage node
    58.5: Entry processor invocation complete
    60ms: Serialization of result is complete
    My questions are:
    - What is happening between the end of serialization of the object by the proxy and deserialization starting on the storage node?
    - Given that the cache is POF enabled, why is the proxy deserializing and reserializing the entry processor?
    Version is 3.7.1.6

    Hi Rob,
    Config is below. defer-key-association-check is not set. The timings were established by logging the POF serialization in each process so its definitely the proxy that is doing it.
    Regards,
    Dave
    Client config:
    <?xml version="1.0"?>
    <cache-config xmlns="http://schemas.tangosol.com/cache">
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Cache</cache-name>
    <scheme-name>remote-scheme</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <remote-cache-scheme>
    <scheme-name>remote-scheme</scheme-name>
    <service-name>ExtendProxyService</service-name>
    <initiator-config>
    <tcp-initiator>
    <remote-addresses>
    <socket-address>
    <address>localhost</address>
    <port>1234</port>
    </socket-address>
    </remote-addresses>
    <connect-timeout>5s</connect-timeout>
    </tcp-initiator>
    <outgoing-message-handler>
    <request-timeout>1s</request-timeout>
    </outgoing-message-handler>
    <serializer>
    <class-name>Tangosol.IO.Pof.ConfigurablePofContext, Coherence</class-name>
    <init-params>
    <init-param>
    <param-type>string</param-type>
    <param-value>assembly://..../pof-config.xml</param-value>
    </init-param>
    </init-params>
    </serializer>
    </initiator-config>
    </remote-cache-scheme>
    </caching-schemes>
    </cache-config>
    Server cache config:
    <?xml version="1.0"?>
    <cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
    xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config coherence-cache-config.xsd">
    <defaults>
    <serializer>pof</serializer>
    </defaults>
    <caching-scheme-mapping>
    <cache-mapping>
    <cache-name>Cache</cache-name>
    <scheme-name>cache-distributed</scheme-name>
    </cache-mapping>
    </caching-scheme-mapping>
    <caching-schemes>
    <distributed-scheme>
    <scheme-name>cache-distributed</scheme-name>
    <service-name>PartitionedCache</service-name>
    <thread-count>10</thread-count>
    <partition-count>2039</partition-count>
    <backing-map-scheme>
    <local-scheme />
    </backing-map-scheme>
    <autostart>true</autostart>
    </distributed-scheme>
    <proxy-scheme>
    <service-name>ExtendProxyService</service-name>
    <thread-count>5</thread-count>
    <acceptor-config>
    <tcp-acceptor>
    <local-address>
    <address>localhost</address>
    <port system-property="tangosol.coherence.proxy.port"></port>
    </local-address>
    </tcp-acceptor>
    </acceptor-config>
    <proxy-config>
    <cache-service-proxy>
    <class-name>....InteceptorCacheService</class-name>
    <init-params>
    <init-param>
    <param-type>com.tangosol.net.CacheService</param-type>
    <param-value>{service}</param-value>
    </init-param>
    </init-params>
    </cache-service-proxy>
    </caching-schemes>
    </cache-config>

  • JTabbedPane and focus problem.

    Hello. I currently have a JTabbedPane which contains the various panels that make up different tabs. These tabs are extensions of panels, and are seperate classes imported into the class which contains my JTabbedPane and then added. The frame which conatins my JTabbedPane also has a button, which when pressed I wish it to look at the tab which is currently active, and call a method from the class which this tab refers to. The problem is that I don't know how to get my button to determine which tab is currently active. Any help will be gratefully recieved.

    Use getSelectedComponent() or getSelectedIndex() of your JTabbedPane object.

  • JTabbedPane and one Button for all Tabs

    Hello everybody,
    im new here an would say HELLOOO to everyone
    So ive got an issue.
    I am creating in "class A"  tabs for a JTabbedPane. In "class B" i create the JTabbedPane and creat instances of class A and add them to the TabbedPane.
    in Class B i also create a button, for save actions. When i click the button, a method "save()" will be called and read from every tab the Strings out of textfields.
    My problem now is, that it dont work, i call the save method with the instance from the tab, but it dont getText() from the textfield.
    For example:
    //create an instance tab, parameter is the save file
    Tab myTab = new Tab(file);
         //other code
    (Tab)myTab.save(); //here i eclipse cast to Tab automatically
    the save-Method in class A (Tab):
    save() {
    sysout(texfield1.getText)
    BTW how can i highlight code in this forum?

    You can add syntax highlighting by going into the advanced editor, that will add a button for it. Unfortunately there are no quick code tags :/
    After you find the button post your ACTUAL code. not just some random snippet which looks like your code. What you posted doesn't even compile.

  • JTabbedPane, and JPanel.

    Hi im going thrue swing tutorials here on sun. And wonder a bit about hierarchy. I use JTabbedPane and every class have there own JPanel that i add to the extended JPanel. I show below with example.
    In Main class
      public JFrame mstFrame() {
            JFrame frame = new JFrame("Main Frame");
            JTabbedPane mstPane = new JTabbedPane();
            mstPane.addTab("Start", new StartPage());
            frame.add(mstPane);
            frame.setVisible(true);
            return frame;
        }In StartPage Class
    public class StartPage extends JPanel {
        JPanel createProjectPanel = new JPanel(new GridBagLayout());
         GridBagConstraints c = new GridBagConstraints();
         JScrollPane createCustomerPane = new JScrollPane();
         c.gridy = 1; // second row
         c.gridx = 0; // first cell
         createProjectPanel.add(createCustomerPane ,c);
    add(createProjectPanel);Does this destory the hierarchy, or is it okey to do it this way?

    It makes sense to have each tab represented by a panel, so I don't reallly understand the question.
    public class StartPage extends JPanel
        JPanel createProjectPanel = new JPanel(new GridBagLayout());
        add( createProjectPanel );However, it is unecessary to create a second panel since your class already extends JPanel. Just add the scrollPane directly to the class.
    setLayout( new GridBagLayout() ):
    JScrollPane createCustomerPane = new JScrollPane();
    add(createCustomerPane, c);

  • OPSM 1.2 [Oracle pedigree and Serialization manager] installation is failed

    Hi All,
    We are doing OPSM 1.2 installation on Oracle Enterprise Linux 5.6 [64-bit].
    Steps we have done:
    1. installed 11g db and created repositories for soa server.
    2. installed weblogic server 10.3.6
    3. Installed soa server & created two managed servers soa_server1 and pas_server1 in weblogic as per the doc " Oracle Pedigree and Serialization Manager Installation Guide"
    4. And created required schemas in db for OPSM.
    5. and ran $MW_ORA_HOME/common/bin/wlst.sh ./pasMasterInstall.py
    Below are The error we are getting at the time of deployment is:
    Deploying the PasSerializationManager application...
    Deploying application from /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear to targets pas_server1 (upload=false) ...
    <Dec 19, 2013 7:56:03 AM EST> <Info> <J2EE Deployment SPI> <BEA-260121> <Initiating deploy operation for application, PasSerializationManager [archive: /u01/ORASOA/Middleware/Oracle_SOA1/pas/applications/install/PasSerializationManager.ear], to pas_server1 .>
    ....................................................................................................No stack trace available.
    This Exception occurred at Thu Dec 19 08:01:04 EST 2013.
    weblogic.management.scripting.ScriptException: Error occured while performing deploy : The action you performed timed out after 300,000 milliseconds.
    Error: Unable to deploy the Ear Files.
    Shutting down the AdminServer...
    Stopping the AdminServer...
    Finished stopping the AdminServer.
    Moving the Installed Files to the Install Directories...
    Finished moving files to install directory.
    Restoring Backup...
    Finished restoring backup.
    ERROR: Installation Failed!
    Note: Please review the above output buffer to determine what error(s)
          have occurred. You must fix any errors before attempting to
          retry the installation.
    WARNING: System failed to register the MDS Repository with WebLogic. It is likely
    that the MDS Repository has already been registered. Please verify the registered
    metadata repositories using Oracle's Enterprise Manager application. Once logged
    into Enterprise Manager, expand the Metadata Repositories node and verify an entry
    exists for mds-mds-ApplicationMDSDBDS. In addition, click on the repository and
    verify it is targeted to the appropriate servers.
    Exiting WebLogic Scripting Tool.
    <Dec 19, 2013 8:01:09 AM EST> <Warning> <JNDI> <BEA-050001> <WLContext.close() was called in a different thread than the one in which it was created.>
    In pas_server1.log file:
    Caused By: oracle.mds.exception.MDSExceptionList: MDS-01329: unable to load element "persistence-config"
    MDS-01370: MetadataStore configuration for metadata-store-usage "MAR_TargetRepos" is invalid.
    MDS-00929: unable to look up name "jdbc/mds/opsm" in JNDI context
    Unable to resolve 'jdbc.mds.opsm'. Resolved 'jdbc.mds'
            at oracle.mds.config.PConfig.loadFromBean(PConfig.java:1008)
            at oracle.mds.config.PConfig.<init>(PConfig.java:767)
            at oracle.mds.config.MDSConfig.loadFromBean(MDSConfig.java:1151)
            at oracle.mds.config.MDSConfig.loadFromElement(MDSConfig.java:1218)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:781)
            at oracle.mds.config.MDSConfig.<init>(MDSConfig.java:728)
            at oracle.mds.internal.lcm.deploy.DeployManager.deploy(DeployManager.java:529)
            at oracle.mds.internal.lcm.deploy.DeployManager.startDeployment(DeployManager.java:211)
            at oracle.mds.internal.lcm.MDSLifecycleListenerImpl.start(MDSLifecycleListenerImpl.java:215)
            at oracle.mds.lcm.weblogic.WLLifecycleListener.preStart(WLLifecycleListener.java:77)
            at weblogic.application.internal.flow.BaseLifecycleFlow$PreStartAction.run(BaseLifecycleFlow.java:282)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
            at weblogic.application.internal.flow.BaseLifecycleFlow$LifecycleListenerAction.invoke(BaseLifecycleFlow.java:199)
            at weblogic.application.internal.flow.BaseLifecycleFlow.preStart(BaseLifecycleFlow.java:62)
            at weblogic.application.internal.flow.HeadLifecycleFlow.prepare(HeadLifecycleFlow.java:283)
            at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:648)
            at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
            at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
            at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
            at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
            at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:208)
            at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
            at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
            at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
            at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
            at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
            at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
            at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
            at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
            at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    Any one please  provide resolution to fix the issue. 
    Thanks
    skjb     

    Have you searched MOS website for (MDS-01370 AND MDS-00929) and go through the docs?
    If none of MOS docs help, then please log a SR.
    Thanks,
    Hussein

  • Equipment Master and Serialization

    Hi,
    Can anybody give me an overview/Definition on Equpment master and serialization in SAP. Where do we need them exactly and why? how does it relates to SD?
    Your early response will be highly appreciated.
    Thanks

    Hi Muhammad,
    Please check this links.
    http://help.sap.com/saphelp_erp2005/helpdata/en/01/d544ef4ab311d189740000e8322d00/frameset.htm
    http://help.sap.com/saphelp_erp2005/helpdata/en/dd/560d93545a11d1a7020000e829fd11/frameset.htm
    Hope this will help.
    Regards,
    Ferry Lianto
    Please reward points if helpful.

  • Comparable and Serializable interfaces

    Hi All,
    I have developed a program in java which implements Comparable and Serializable Interfaces. After, I decided to run the program in J2ME. But later on, I found that MIDP doesn't implement these interfaces.
    Some one can help me how to implement my own interfaces.
    Thank you

    Hi Supareno
    I need urgently your help.
    I developed Java program which works as predicitive text system for my mother tongue.I would like to move from Java to J2ME. But until now I have problems. please can u help me. the following code run in command line.
    I tried to develop my own interfaces as you told me but it doesn't work.
    Help me also for reading and writing text files.
    Thank you
    import java.util.*;
    import java.io.*;
    import java.util.Vector;
    import java.util.Enumeration;
    public class PredText {
    private Vector dict;
    public static final String dictionaryFile = "C:/java/words.txt";
    // convert a string to the corresponding signature
    public static String toNumeric (String word) {
    String lowerWord = word.toLowerCase();
    StringBuffer result = new StringBuffer("");
    for (int i = 0; i < lowerWord.length(); i++) {
    char c = lowerWord.charAt(i);
    if ("abc".indexOf(c) > -1) result.append("2");
    else if ("def".indexOf(c) > -1) result.append("3");
    else if ("ghi".indexOf(c) > -1) result.append("4");
    else if ("jkl".indexOf(c) > -1) result.append("5");
    else if ("mno".indexOf(c) > -1) result.append("6");
    else if ("pqrs".indexOf(c) > -1) result.append("7");
    else if ("tuv".indexOf(c) > -1) result.append("8");
    else if ("wxyz".indexOf(c) > -1) result.append("9");
    else if (" ".indexOf(c) > -1) result.append("9");
    else result.append("?");
    return result.toString();
    // find all the words corresponding to a signature
    public Vector findMatches(String sig) {
    WordSig ws = new WordSig(sig, "");
    WordSig newws;
    Vector results = new Vector();
    int index;
    index = Collections.binarySearch(dict, ws);
    if (index < 0){
    // no matches! :(
    // try to get the string that starts with a substring like ours.
    index=-1-index;
    if (((WordSig)dict.get(index)).getSig().startsWith(sig)) {
    // no word found. we return those starting with the
    // same signature
    newws = (WordSig) dict.get(index);
    results.addElement(newws.getWord().substring(0,sig.length()));
    return results;
    } else{
    //no match
    return results;
    } else {
    // go back to the first match
    while(((WordSig)dict.get(index)).getSig().equals(sig) && index>0)
    index--;
    if (index != 0)
    index++;
    while ((newws = (WordSig) dict.get(index)).equals(ws)){
    results.addElement( newws.getWord() );
    index++;
    return results;
    // intialises the dictionary
    public PredText () {
         String word;
    String sig;
    Vector dict = null;
    // first try to load dict.dat
    try {
    System.out.print("Trying to load dict.dat...");
    FileInputStream fileStream = new FileInputStream("C:/java/dict.dat");
    ObjectInputStream objectStream = new ObjectInputStream(fileStream);
    dict = (Vector) objectStream.readObject();
    fileStream.close();
    System.out.println(" done.");
    }catch (ClassNotFoundException classNotFoundException) {
         System.out.println("Unable to create an object");     
    catch (IOException e) {
    // exception: create the dictionary
    System.out.println("Error. I'm going to recreate the dictionary file");
    try {
    dict = createDict();
    catch (IOException ioe) {
    System.err.println("Error while creating dictionary file. Exiting." + e);
    System.exit(1);
    this.dict = dict;
    // create the dictionary serialised file
    public Vector createDict () throws IOException {
    String word;
    Vector dict = new Vector();
    //open the dictionary file
    System.out.print("Reading the dictionary... ");
    BufferedReader dictFile = new BufferedReader(
    new FileReader(dictionaryFile));
    //insert each word into the data structure
    while ((word = dictFile.readLine()) != null) {
    word = word.toLowerCase();
    dict.addElement(new WordSig(toNumeric(word), word));
    // List list = dict.subList(0, dict.size());
    List list = dict.subList(0, dict.size());
    Collections.sort(list);
    System.out.println("done.");
    System.out.print("Writing the dictionary... ");
    FileOutputStream fileStream = new FileOutputStream("C:/java/dict.dat");
    ObjectOutputStream objectStream = new ObjectOutputStream(fileStream);
    objectStream.writeObject(dict);
    objectStream.flush();
    fileStream.close();
    System.out.println("done.");
    return dict;
    public static void main (String args[]) {
         PredText pt = new PredText();
    if (args.length == 0) {
    // no arguments, find the largest clash
         Vector result;
         Enumeration e = pt.dict.elements();
    String currentSig = "";
    String prevSig = "";
    int clash = 0;
    int maxClash = 0;
    String clashSig = "";
    while (e.hasMoreElements()) {
    WordSig ws = (WordSig) e.nextElement();
    currentSig = ws.getSig();
    if (currentSig.equals(prevSig)) {
    // another word with the same signature
    clash ++;
    } else {
    // new signature: check if the previous one led
    // to a maximal clash
    if (clash > maxClash) {
    clashSig = prevSig;
    maxClash = clash;
    clash = 1;
    prevSig = currentSig;
    result = pt.findMatches(clashSig);
    System.out.println("The signature leading to most clashes is "
    + clashSig + " with " + result.size() +
    " number of clashes");
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else if ("0123456789".indexOf(args[0].charAt(0)) > -1){
    // numeric input: find the matches for the argument
    Vector result;
    result = pt.findMatches(args[0]);
    for (int j = 0; j < result.size(); j++) {
    System.out.println((String)result.get(j));
    } else {
    // convert each word to the corresponding signature
    for (int i = 0; i < args.length; i++) {
    System.out.print(toNumeric(args) + " ");
    class WordSig implements Comparable, Serializable {
    String word;
    String sig;
    public WordSig (String sig, String word) {
    this.sig = sig;
    this.word = word;
    public String getSig () {
    return this.sig;
    public String getWord() {
    return this.word;
    public int compareTo (Object ws) {
    return sig.compareTo(((WordSig) ws).getSig());
    public boolean equals (Object ws) {
    return sig.equals(((WordSig) ws).getSig());
    public String toString () {
    return sig + ", " + word;

  • Comparable and Serializable Interfaces in MIDP

    Hi All,
    I have developed a program in java which implements Comparable and Serializable Interfaces. After, I decided to run the program in J2ME. But later on, I found that MIDP doesn't implement these interfaces.
    Some one can help me how to implement my own interfaces.
    Thank you

    Thank you for replying to me.
    My problem is to compare to objects in MIDP.
    You know that in java is possible to implements directly the Comparable interface but in MIDP is not the same. So I think it requires to create your own. Is that my question.
    I need some to help me. just to avoid the implentation of comparable interface from the java lang package.
    Thank u.

  • What is serialization and serializable

    what is serialization and serializable,Can any body explain me please.

    hi
    Serialization in java is the process of making the object flat which can later be stored on your disk like a normal flat file. the serailized object can be found useful mainly when using RMI and EJB where we persist cobjects so that they can be sent online (thru cable) by this we mean for objects to be distributed the prerequiste is tht they should be serialized. For this we have a interfacein java called "Serializable". the class tht needs serialization of its object should implement this class. this is a marker interface(the interface tht contains nmo methods)
    hope the concept is clear if not please mail me to : [email protected]
    bye
    thnx and regards
    bhaskara navuluri

  • Web Application and Serialization

    Hi, i have a problem with a web application that is running on an Application server (BEA WebLogic 7.0). I have only the war file of the web application and i must know if in this war there is a class that is not serializable.
    How can i find it ? Is there a tool that can help me to find not serializable classes ?
    Thanks.
    claudiozx2006

    One way to do that is to decompile Java classes with Java decompiler and see which one doesn't implement Serializable interface. Here is a link to a good decompiler: http://www.kpdus.com/jad.html

Maybe you are looking for

  • Looking for a replacement calendar

    Does anyone know if there is a replacement calendar app where I can open up the appontment box on tapping the time I want to make the appontment? (ie like the Blackberry method) I want to bypass the default process of tapping the +, then fill in the

  • Unable to create a Materialized View

    I have this query to generate continous dates for the given number of months (12 in this case). (SELECT ADD_MONTHS(TO_DATE('2007-01-01', 'yyyy-mm-dd'), rownum - 1) Transaction_Date_Month   FROM DUAL           CONNECT BY level <= 12)I am using this qu

  • Requisition Creation -- E-Recruiting

    The manager create requisition in management involvment, no. She hit "Save draft" button. Now, where she see this draft requisition. I see it in Requisition Overview, but when I click on the requisition / click details button it display details but n

  • Media Browser not loading with Aperture 3.1

    I upgraded to Aperture 3.1 with the automated software update and have come across a debilitating problem - the media browser can no longer load Aperture photos. When I click on Aperture the browser that shows up in a standard file open dialog window

  • Firefox works fine on version 26. When it updates to version 27, i get undefined entity. I've tried getting profile manager to run and it won't. Need help

    Version 26 works fine. When it updates to version 27.01, I get undefined entity. I've tried uninstalling and then reinstalling. I've tried to bring up profile manager but it doesn't come up. I've tried deleting Firefox folders. I'm very disappointed