Control flow between classes and a midlet

Hi All..
I have somewhat of a strange Question to ask.
Consider that I have 3 java classes: A B C that are used by a midlet M.
And the main purpose of A B C is to modify the user interface of M somehow. So maybe A causes a textbox to be displayed, maybe B creates a form etc..
Also, the midlet implements the Commandlistener interface...hence has an actionCommand method.
So I am wondering ..if one of these classes (A B C) creates a gui component that has commands, and implements the actionCommand method (from the CommandListener interface), I find that the commands execute properly, but of course, the control is never returned to the main midlet M.
I would like the classes: A B C to take care of a given representation/apprearance of the display..which may include commands, but I dont know how they can work with the main midlet.
I cant make the classes pass the commands to the midlet ..because I would like to define their implementation in the actionCommand method..and I dont want the Main midlet to know about the commands that these classes implement...
Does anyone know how I can implement this? If this makes any sense at all, please send me a reply..I would appreciate any comments.
cheers all
cleoppatra

Hi,
You mentioned that I should do the following:
display.setCurrent(midletname)
SO if my midlet is called Browser, should i say:
display.setCurrent(Browser)
I dont know if this is what you menat, but it doensnt work out.
Can you tell me what you mean?
cheers

Similar Messages

  • Link between Class and characteristics created for that class

    Hi All,
    Is there any table that I can look at to find a link between class and the characteristics created for that class. For all the list of characteristics created I am refereing to CABN table but my requirement is to find the logic to see all the characteristics created for a class. Can anyone suggest me the right table to look at?
    Regards,
    Shane

    Hi,
    I would like to thank you for your quick response. So based on your thoughts, here is the process i followed to find the characteristics for a existing class,  took the Internal class number and used the KSML table to find all the Characteristics created for that class.
    To find the list of values assigned to that characteristics, used the AUSP table for that characteristics internal number.
    Thank you again for your inputs
    Shane.

  • What is the fundamental difference between classful and classless routing?

    Hello to all,
    After reading several RFCs, guides and HOWTOs I am confused by an apparently trivial question - what is the basic, fundamental difference between classful and classless routing?
    I am well aware that - said in a very primitive way - the classful routing does not make use of netmasks and instead uses the address classes while the classless routing utilizes the netmasks and does not evaluate the address classes.
    However, already in 1985 the RFC 950 (Internet Standard Subnetting Procedure) stated that the networks can be further subnetted using the network mask. Since then the routers are expected to use network masks in the routing decision process in the precise way they use it nowadays. However, if the routers use network masks they are doing the classless routing, aren't they? Where is then the difference if we used to describe the 80's way of routing as a classful routing? Or was it already the classless routing? The RFCs about CIDR came gradually only in 1992 and 1993.
    If somebody could give me an insight into the key difference between classful and classless routing (and perhaps into the Internet history, how was the real routing done then) I would be most grateful.
    Thank you a lot!
    Regards,
    Peter

    Hello Mohammed,
    I am afraid we still have not understood each other ;) I am not looking for the algorithms used to select the best path. I am well aware of them, both Ford-Bellman and Dijkstra, and about their internals. By the way, these algorithms do not have any influence whether the routing is classful or classless because they deal with metrics, not with masks. For example, a classless EIGRP internally uses a distance-vector algorithm, not a SPF algorithm.
    I will try to explain once more what is my problem... There are two terms commonly used but badly defined: the classless routing and classful routing. Originally, I have thought that the classful routing works as follows:
    - The routing table consists only of classful destination networks (major nets), metrics and respective gateways. No network masks are stored in the table because we are classful, that is, we use exclusively the route classes and all entries in the routing table are already classful.
    - When routing a packet, the router looks at its destination IP address and determines the major net of this IP address (that is, the classful network that this IP address belongs to). Then it looks up the corresponding entry in the routing table and sends the packet to the respective gateway.
    I thought that the classful routing works in this way. I won't describe the classless routing - both of us know how do the today's routers select the next hop.
    However, in the RFCs 917 and 950 which were published in 1985, long ago before the term 'classless routing' was coined, the network mask was already defined and it was stated how the routers should work with it.
    Now I am confused. The terms classless addresses and classless routing were defined sometime in 1990's, therefore I assume that the routing before the invention of classless IP assignment can be in fact described as classful. In other words, I thought that the routing that was commonly used in 1980's did not use netmasks and can be described as classful because the notion of classlessness came first in 1990's. But now I see that netmasks were defined in 1985.
    Now where am I wrong? Do I understand the classful routing properly as I described it? Is it correct to talk about routing in that era as classful although the netmasks were already in use? Or was it already the classless routing?
    Basically I am trying to understand what was called the classful routing if the classless routing is said to be something different.
    Mohammed, I am most grateful to you for your patience and suggestions! Thank you indeed.
    Regards,
    Peter

  • Controlling events between classes

    hello
    i know i'm asking a lot, but i couldn't find anything. the problem is i've got a jframe and some panels with buttons.
    eg:
    class A extends JFrame
    getContentPane().add( B ) ;
    getContentPane().add( C ) ;
    class B extends JPanel
    add( button1 ) ;
    add( button2 ) ;
    class C extends JPanel
    add( button3 ) ;
    add( button4 ) ;
    where do i add ActionListeners? how do i pass information between classes? if button1 is clicked -> class A should know it.
    i tried to do this in class A: objectOfB.button1 (access button1 directly) - didn't work - why?
    if a button1 is clicked i want to remove the jpanel and replace it with another one. how should i do this?
    Thank You All

    Check out the java tutorials. There are great examples that show you how to do what you want to do

  • Issue with Data flow between Unicode and Non Unicode systems

    Hello,
    I have scenario as below,
    We have  a Unicode – ECC 6.0 and a UTF 7 – Legacy system.
    A message flow between Legacy system to ECC 6.0 system and the data is of 700 KB size.
    Will there be any issue in this as one is Unicode and other is non Unicode?
    Kindly let me know.
    Thanks & Regards
    Vivek

    Hi,
    To add to Mike's post...
    You indicate that your legacy system is non-Unicode and the ERP system is Unicode.  You also said that the data flow is only <i>from</i> the legacy system <i>to</i> the ERP system.  In this case, you should have no data issues, since the Unicode system is the receiving system.  There <b>are</b> data issues when the data flow is in the other direction: <i>from</i> a Unicode system <i>to</i> a non-Unicode system.  Here, the non-Unicode system can only process characters that exist on its codepage and care must be taken from sending systems to ensure that they only send characters that are on the receiving system's codepage (as Mike says above).
    Best Regards,
    Matt

  • Pics flow between iPhone and itunes

    I want to activate the pics flow between my iPhone and iTunes on the PC. When i click on " pics flow" in options it's ask me an "URL".
    How to do it?
    Thanks!

    I checked again last night, and now iTunes matched the phone settings, saying zero space was available. I had nearly 20 gigs of "Other" data :/
    So I erased all settings/data on the iPhone and restored from an iCloud backup from last week, and now everything seems fine, with over 15 GB of available space.

  • Difference between class and component

    Hi,
    Can any help me
    1) what are the differences betw a java class and java component.
    2) what are the differences betw a java script and java.
    3) Is there any difference betw a java and server side java
    4)what is class path.

    what you seriously need is to read the tutorials.
    ad 1) typically a component is encapsulated in a jar, but a class may be a component, too. this is very much dependent on the context.
    ad 2) Java is a full featured programming language, JavaScript is a typeless scripting language mostly used in internet browsers. they share some basic syntactic constructs, but that's all.
    ad 3) server side java denotes certain functionality implemented in java.
    ad 4) the list of places a virtual machine looks into to load classes
    robert

  • Recover informations between Class and MovieClip

    Hello,
    I have a page (MovieClip) which is charger and have a attribut a matrix (not the class). On this page, there is some cases (MovieClip) which receive value of the matrix.
    Each cases are managed by Class. It's a good option, because I can put a listener into the contructor of the class and not having 64 functions if I have 64 cases. This listener allows to change the value of the cases when it clicked.
    The problem is that I don't see how to know when a case is clicked in the page for changing the value of the matrix.
    Regards,

    I have a MovieClip called "Level" and I have created a Class "Level" and a Class "Matrice". The "Level" Class has an attribute mat:Matrice. The "Matrice" Class has a dimension and a 2 dimension array (If dimension = 2, you have a 2x2 matrix).
    On the Level MovieClip, you have several Case MovieCLip. I also created a "Case" Class for managing the listener.
    And when I clicked on a Case, the text value changed but I can not update the Matrice in the Level Class.

  • Java Communication Between Classes and JFrame JDialog

    i have written a standalone connect 4 game.
    next i would like to be able to play it over network and also have a chat function.
    connect 4 GUI (JFrame) holds -> connect 4 game model
    i would like to implement connect 4 network GUI(JDialog) (here the user can choose to act as a server or client) that holds Network API.
    and finally a Chat GUI (JDialog) to exchange messages.
    my question is how do i implement inter class/GUI communication? when a network message is received it ought to be delivered to the right receiver (game / chat) also messages sent from chat / game transmitted to remote machine.
    i have looked into inner classes but was told it is a bad idea to implement so much with in single class and i did not like this idea a lot either.
    i have written another game battleships in C# and it uses delegates to accomplish this task but sadly im informed that delegates are not available in Java.
    im a beginner and at the moment exploring options so im open to your guidance.
    thank you.

    Addition to my above submission
    To clarify, I'll offer the US$20 to the FIRST person who offers me a workable solution to the problem, not to everyone!!!
    JMGRAHAM

  • Difference in control panel between 6500 and 6500 e709n series

    Hello,
    Although I still have a non-solved problem in this topic (printing from IE8 x64), I already have another one.
    It seems that there are three 'printers' installed in control panel. One is called HP Officejet 6500 E709n Series fax, which I understand is the fax. However, the other two seem very similar to me. Hp Officejet 6500 and HP Officejet 6500 E709n Series. I would like to know the difference between those two, especially because I rarely have to switch between those two, when one of them does not work.
    Which one is the best to set as default, and why won't I just delete the other one?
    Thanks,
    Michael B

    Print from both to test them.  Delete one (if only one works, delete the other one).
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • Triggers and control unit between drums and Logic

    I have to purchase a trigger set and a trigger control unit to put on a Ludwig drum kit so that to connect to my Stylus RMX sets on Logic thru my AMT8 interface. I have heard about Ddrum for the trigger set, and for the control unit?..
    Any advice?
    Thanks
    Fulvio

    the d4 is ok, but unable to load in your own samples. the d5 has this option, but is discontinued. The Yamaha RM50 is my weapon of chioce and is leaps and bounds better in sound quality and options than anything I've seen from Alesis. Great audio out options, and of course, all the MIDI you need, plus the ability to load samples with a memory expansion, and ability to trigger sounds from any card in the R series synths. meaning, load a card for a bass guitar and trigger that from your kick drum, load some string and fx patches and trigger those from your snare. endless possibilities. Check out the RM50, I love mine and highly recommend it.

  • Work Flow between PP and AE

    I am newB to AE and wanted to ask the following: If I am in PP and have a timeline with a bunch of clips and decide I want to apply an AE effect to one (lets say a 10 sec clip which is sourced from a 10 minute long footage file) Now I cant copy the clip segment from the PP timeline and paste into AE (wishful thinking) Using the Dynamic link from PP just creates a new AE Comp with a link back to PP. So should I render out my 10 secs in PP and use that file in AE (dont like the sound of that) or should I import the 10 min source file and manually trim it in AE (also painful) I tried to chop it down in Virtualdub - but no luck as it is a HDV mts source. Thanks in advance Mick

    Thanks Steve. When I do this and copy the clip from PP timeline OK, but when I paste into AE I get the whole source file (not just my PP timeline portion) Is that right? I can live with it but wanted to make sure I was not missing something. The actual HDV file is 9G - so AE reports media pending for quite a while. I then have find my portion and trim it in the AE timeline to find my (PP timeline part) I want to work with. Am I making sense?

  • Differenc between Class and Enum

    Hi,
    why is it possible to define a class inside a method but not en enum, like in the following code:
    public class Java {
         public static void method() {
              class MyClass {
              enum MyEnum {
                   A, B, C;
    }I have no answer...
    Greetings,
    Martin
    Edited by: Mkrueger on Feb 8, 2009 1:52 AM

    malcolmmc wrote:
    >
    I've used them. The advantage of a named local class over an anonymous one is that they can define their own methods that can be accessed from the method in which it's defined, rather than just the methods of an existing interface.Heh, heh, Notice that type capture (?) allows me to use an anonymous implementation of Closure instead of naming it.
    import java.util.*;
    interface Closure<T> {
        void call(T it);
    public class Each {
        public static <T, F extends Closure<T>> F each(Iterable<T> col, F clo) {
            for(T t : col) {
                clo.call(t);
            return clo;
        public static void main(String[] args) {
            List<Integer> list = Arrays.asList(1, 2, 3, 4, 5);
            int result = each(list, new Closure<Integer>(){
                int sum;
                public void call(Integer it) {sum += it;}
            }).sum;
            System.out.println(result);
    }

  • Html flow between mobile devices and server?

    One last question. Sorry for flooding this board.
    I need to write a paper on oracle lite for my database class...
    My focus has to be on the communications between the remote devices
    and the server.
    As I can't seem to get Olite installed and working, I was wondering if one
    of three things:
    1) Is there an apnote that explains the protocol flow between devices and
    server?
    2) Is there a public, open, olite server that a remote client could connect
    to? (I know, not likely)
    3) if anybody had some non confidential ethereal traces of the html flow they could offer?
    Anybody have any other ideas to offer?
    Thank you,
    Mike

    Hi Mike,
    There are all kinds of white papers out for this information.
    http://www.oracle.com/technology/products/lite/TWP_Lite_10gR3.pdf
    There isn't an open public olite server for someone to connect to. Although that is a good idea.
    What type of HTML flow are you looking for? Sync, Webtogo/OC4J? The Webtogo/OC4J containers work like any other Servlet containers. The sync is the blackbox. Page 6 of the pdf has a little diagram showing what happens during a sync.

  • Trying to pass parameters between GUI classes and methods

    Hi All.
    I have been working on a rather large final year project in college and it is getting close to the deadline. It looks as though I need to "tidy up" my code as it contains too many static methods, variables and other bad programming habits. My package consists of many different GUI's and classes. Up until now I have been calling different GUI's with guiName.NameOfMethod. I have been told this is bad practice so I am trying to fix this. Also instead of passing parameters correctly I have been creating static variables in my main class and using them. So for example if one class needed to pass a variable to the other I would first myGlobalVariable = X; in the first class. And then the second class can use this. This is also bad, right?
    So I guess im really just looking for a good example or tutorial on how to pass parameters between classes and methods, GUI if possible. Here is an example of how my GUI classes look:
    public class anotherGUI extends JFrame implements ActionListener {
            private JTextField a, b, c;
            private JButton button1, button2;
            JPanel p, p1;                   
            public anotherGUI() {
                LayOutAnotherGUI();
                setLocationRelativeTo(DnDMain.pictureArray[a]);
                setTitle("Example");
                setVisible(true);
                pack();     
            private void LayOutAnotherGUI(int c) {
         //GUI is layed out here     
            public void actionPerformed(ActionEvent e) {
                Object source = e.getSource();
                if (source == submit)
                    clickOK();
            public void clickOK(){
                //Here is where I have been accessing and modifying static global variables.  (But this needs to change).
    public void showanotherGUI() {
            new anotherGUI();
    }This is more or less how I have been going about creating my GUI's. These are used as pop ups. The user enters a value and then it is closed.
    To be honest I have been able to pass a variable correctly from one class to a GUI class but I have still having difficulty. For example in my code above I can pass the variable into this class but I cannot pass it into clickOK(). An this is where it is needed.
    Can anyone please help?
    I hope I have explained my problem well.
    Thanks in advance.

    I dont think that is what I need. An example of what I do in my program is:
    I have a main GUI with an array of images. There are a number of other small GUI's that appear for certain functions when the user clicks on an image or does some other function. I am trying to pass a value into the GUI class that is used for the smaller "pop up" GUI. So lets say the user has clicked the image in array[12]. Then a GUI is displayed. I need to pass the integer 12 into this class.
    Thanks.

Maybe you are looking for