Softbuttons and FullScreenMode

hey!
in my application i set full screen mode and then i add commands, for example Command.BACK.
The problem is that when i have full screen mode there are showing something like submenu after clicking soft button 'back'. And i dont want this submenu, i want to invoke directly other object (this is my own menu).
How can i do this?
thx in advance for help
-thud

in my application i set full screen mode and then i add commands, for example Command.BACK.
The problem is that when i have full screen mode there are showing something like submenu after clicking soft button 'back'.MIDP 2.0 specification explicitly allows device to behave like described above: *"In full-screen mode... Commands may be presented using some alternative means (such as through a pop-up menu)"* -- [click here for specification of full screen mode in MIDP 2.0|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Canvas.html#fullscreen]
In order to directly invoke some other object, I would rather use [keyPressed() method|http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/lcdui/Canvas.html#keyPressed(int)]...

Similar Messages

  • FSM with JMF 2.1.1(a) and one more problem. !! URGENT

    Good AfterNoon All...
    I am working on JMF 2.1.1 and I want to show a .avi file in fullScreenMode.
    How can i do so with jdk 1.4.
    I have gotten viewComponent and control comp.
    My application is running sucessfully. NO PROBLEM.
    But i want to show the movie in FSM . In order to do so, what i am doing is , I remove view
    Comp from my JFrame (in which whole of the process is going on.) .
    Add that viewComp in fullScreenWindow (which is initilized Window with parent frame.).
    But here some problem is there. According to me, it is painting problem.
    viewComp is removed successfully from frame but not added in window.
    Layout of window is border and i am adding viewComp in center of window.
    Running movie is not visible in Window. WHY ? what could be the possible reason.
    Is it possible or It can't happen. ?
    One thing more.... HUH...
    I have a menubar in frame with file and tool menus.
    when player initilized and movie starts running . You know what happens.
    Clicking on menu(s) doesnot cause menuitem(s) to visible or pull down. ?? Oh ! GOD.
    viewComp is at center and controlComp is at South.
    When i click on say fileMenu. file Menu pressed as always happens with swing's color but menuitems donot visible.
    WHY ?
    It seems that menuitems are visible ....hamam.ma...mmm I mean they are hided by viewComp.
    how to get ride of this problem. ?
    Any idea is highly appreciated.
    And it is nice working with JMF.

    Nobody .... ??
    I have found the answer of my 2nd question but still first is creating problem.
    Does anyone know it.. how to do it..
    Full Screen Mode in JFM.
    Thanks
    Sanjeev Dhiman

  • Is it possible to change what area gets hidden with fullscreenmode?

    I have made modifications to the layout of SP2013 which now causes issues with the fullscreenmode option. Such that, items that I have added are not being hidden even though they should be and the fullscreenmode icon goes away when I got to full
    screen, making it impossible to full back until I switch .master pages and switch it back.
    Does anyone know where I need to look for this?

    Hi Grady,
    According to your description, my understanding is that you want the Focus on Content control to work correctly after customizing the  master page.
    To make it work, you need to wrap your main content around Contentbox div , such as adding the following string at the front of your main content:
    <div id="contentBox" aria-live="polite" aria-relevant="all">
    Or use the following code in a Content Edit Web part in the page that you wan to use focus on content button:
    <script type="text/javascript">
    window.onload = function()
      SetFullScreenMode(true);
    </script>
    Here are some similar posts for you to take a look at:
    http://mysharepointwork.blogspot.ca/2013/07/focus-on-content-not-working-in-custom.html
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/04189fe1-37d9-4e06-ba57-fdabe4a92e19/is-there-a-way-to-make-focus-on-content-as-default-for-all-pages?forum=sharepointadmin
    http://technicaltrix.blogspot.in/2013/02/sharepoint-2013-fullscreen-modehide.html
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • Display size in fullScreenMode

    i hava a class which extends Canvas.
    because i need a fullScreenApplication i used this.setFullScreenMode(true);
    this works quit good, but when i use getHeight() and getWidth() in order to receive the height and width of the whole display, i unfortunately don't get them.
    instead only the dimensions of the canvas not using fullScreenMode are returned.
    i also don't understand the values of the returned width and height -> 240 x 309.
    my phone (nokia 6600) only has a resolution of 176 x 208. are these twips? if yes, how can i convert them to pixels?
    i hope somebody can help me with this problem
    greetz

    thx for your advice, but unfortunately getClipHeight from the Graphics object returns the same value as getHeight from the Canvas Object.
    probably i have to get the height from the device itself, but i don't know how..

  • Argent:FullScreenMode...Help

    Hi,
    I am using fullscreenmode in application. At compile time it doesnot show any exception but at runtime shows error;
    Exception in "thread" java.lang.NulpointerException
    at test.<init>
    at test.main
    please help and correct errors in code Thank u and nice day.
    Code is;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    public class test extends JFrame implements ActionListener{
    GraphicsDevice myDevice ;
    public test() {
    super("Testing");
    getContentPane().setLayout(new FlowLayout());
    JButton jb = new JButton("Close");
    jb.addActionListener(this);
    getContentPane().add(jb);
    //setSize(200,200);
    try {
    myDevice.setFullScreenWindow(this);
    } finally {
    myDevice.setFullScreenWindow(null);
    public void actionPerformed(ActionEvent e){
    if (e.getActionCommand().equals("Close")) System.exit(0);
    public static void main(String[] args){
    test myWindow = new test();
    myWindow.setVisible(true);
    /*GraphicsDevice myDevice ;
    try {
    myDevice.setFullScreenWindow(myWindow);
    } finally {
    myDevice.setFullScreenWindow(null);

    Its working now....But still taskbar is shown. I want my application in exclusively full screen mode so that only my application is visible on screen. Plz provide me solution.
    Thanks and have a nice day
    Anand Pimple.

  • E 66 not showing the income-sms-softbutton anymore

    usually the e66 shows up down at the bottowm of your display 3 different softbuttons one for missed calls one for sms or mms that are inbound, and one for recieved emails, although i still have selected in the menu this button to appear , it doesnt appear any longer ?
    what happened ?
    grüsse aus deutschland
    chris

    Hi and Welcme to the Frum,
    Have you tried going to your message ICON > Press MENU KEY > GENERAL OPTIONS > Scroll down to HIDE FILED MESSAGES and click NO. 
    Let me know if that helps!
    Nurse-Berry
    Follow NurseBerry08 on Twitter

  • Cursor in FullScreenMode

    I have my game in FullScreenMode, and i cant seem to find a way to
    make the cursor invisible, is it even possible?
    I think i played a game in fullscreen one time and the cursor wasnt there.
    Can someone tell me if what im talking about is possible in java, or any language?

    A real quick and nasty way to do it would be to create a cutom cursor- but use a completely transparent GIF- this way the user would never see the it!!
    The only danger is, I presume they would see be able to cause mouse events- you would obviously have to handle this in your app i.e. only use keyboard controls.

  • A problem with Threads and loops.

    Hi, I have some code that needs to be constantly running, like while(true)
          //code here
    }However, the code just checks to see if the user has input anything (and then if the user has, it goes to do some other stuff) so I don't need it constantly running and hogging up 98% of the CPU. So I made my class (which has the method that needs to be looped, call it ClassA) implement Runnable. Then I just added the method which needed to be looped into the public void run()
    I have another class which creates an instance of the above class (call it ClassB), and the main(String[] args) is in there.
    public static void main(String[] args)
              ClassA test = new ClassA();
              Thread thread = new Thread(test.getInstanceOfClassA());
              thread.start();
              while(true)
                           //I do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...) but I can't think of away to get it to run - sleep - run -sleep forever. Can someone help me?

    Hi, I have some code that needs to be constantly
    running, like while(true)
    //code here
    }However, the code just checks to see if the user has
    input anything (and then if the user has, it goes to
    do some other stuff) so I don't need it constantly
    running and hogging up 98% of the CPU. Where does the user input come from. Are you reading from an InputStream? If so, then your loop will be blocked anyway when reading from the InputStream until data is available. During that time, the loop will not consume processor cycles.
    public static void main(String[] args)
              ClassA test = new ClassA();
    Thread thread = new Thread(test.getInstanceOfClassA());I have never seen this idiom. If ClassA instanceof Runnable, you simply write new Thread(test).
              thread.start();
              while(true)
    //I do not know what to put
    do not know what to put here
                   try
                        thread.sleep(100);
                   catch(InterruptedException iex)
         }However, the thread only calls run() once,(duh...)Yeah, why would you want to call it more than once given that you have an infinite loop in ClassA.run()?
    Harald.
    Java Text Crunching: http://www.ebi.ac.uk/Rebholz-srv/whatizit/software

  • A problem with Threads and MMapi

    I am tring to execute a class based on Game canvas.
    The problem begin when I try to Play both a MIDI tone and to run an infinit Thread loop.
    The MIDI tone "Stammers".
    How to over come the problem?
    Thanks in advance
    Kobi
    See Code example below:
    import java.io.IOException;
    import java.io.InputStream;
    import javax.microedition.lcdui.Graphics;
    import javax.microedition.lcdui.Image;
    import javax.microedition.lcdui.game.GameCanvas;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    public class MainScreenCanvas extends GameCanvas implements Runnable {
         private MainMIDlet parent;
         private boolean mTrucking = false;
         Image imgBackgound = null;
         int imgBackgoundX = 0, imgBackgoundY = 0;
         Player player;
         public MainScreenCanvas(MainMIDlet parent)
              super(true);
              this.parent = parent;
              try
                   imgBackgound = Image.createImage("/images/area03_bkg0.png");
                   imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
                   imgBackgoundY = this.getHeight() - imgBackgound.getHeight();
              catch(Exception e)
                   System.out.println(e.getMessage());
          * starts thread
         public void start()
              mTrucking = true;
              Thread t = new Thread(this);
              t.start();
          * stops thread
         public void stop()
              mTrucking = false;
         public void play()
              try
                   InputStream is = getClass().getResourceAsStream("/sounds/scale.mid");
                   player = Manager.createPlayer(is, "audio/midi");
                   player.setLoopCount(-1);
                   player.prefetch();
                   player.start();
              catch(Exception e)
                   System.out.println(e.getMessage());
         public void run()
              Graphics g = getGraphics();
              play();
              while (true)
                   tick();
                   input();
                   render(g);
          * responsible for object movements
         private void tick()
          * response to key input
         private void input()
              int keyStates = getKeyStates();
              if ((keyStates & LEFT_PRESSED) != 0)
                   imgBackgoundX++;
                   if (imgBackgoundX > 0)
                        imgBackgoundX = 0;
              if ((keyStates & RIGHT_PRESSED) != 0)
                   imgBackgoundX--;
                   if (imgBackgoundX < this.getWidth() - imgBackgound.getWidth())
                        imgBackgoundX = this.getWidth() - imgBackgound.getWidth();
          * Responsible for the drawing
          * @param g
         private void render(Graphics g)
              g.drawImage(imgBackgound, imgBackgoundX, imgBackgoundY, Graphics.TOP | Graphics.LEFT);
              this.flushGraphics();
    }

    You can also try to provide a greater Priority to your player thread so that it gains the CPU time when ever it needs it and don't harm the playback.
    However a loop in a Thread and that to an infinite loop is one kind of very bad programming, 'cuz the loop eats up most of your CPU time which in turn adds up more delays of the execution of other tasks (just as in your case it is the playback). By witting codes bit efficiently and planning out the architectural execution flow of the app before start writing the code helps solve these kind of issues.
    You can go through [this simple tutorial|http://oreilly.com/catalog/expjava/excerpt/index.html] about Basics of Java and Threads to know more about threads.
    Regds,
    SD
    N.B. And yes there are more articles and tutorials available but much of them targets the Java SE / EE, but if you want to read them here is [another great one straight from SUN|http://java.sun.com/docs/books/tutorial/essential/concurrency/index.html] .
    Edited by: find_suvro@SDN on 7 Nov, 2008 12:00 PM

  • Problem with Threads and a static variable

    I have a problem with the code below. I am yet to make sure that I understand the problem. Correct me if I am wrong please.
    Code functionality:
    A timer calls SetState every second. It sets the state and sets boolean variable "changed" to true. Then notifies a main process thread to check if the state changed to send a message.
    The problem as far I understand is:
    Assume the timer Thread calls SetState twice before the main process Thread runs. As a result, "changed" is set to true twice. However, since the main process is blocked twice during the two calls to SetState, when it runs it would have the two SetState timer threads blocked on its synchronized body. It will pass the first one, send the message and set "changed" to false since it was true. Now, it will pass the second thread, but here is the problem, "changed" is already set to false. As a result, it won't send the message even though it is supposed to.
    Would you please let me know if my understanding is correct? If so, what would you propose to resolve the problem? Should I call wait some other or should I notify in a different way?
    Thanks,
    B.D.
    Code:
    private static volatile boolean bChanged = false;
    private static Thread objMainProcess;
       protected static void Init(){
            objMainProcess = new Thread() {
                public void run() {
                    while( objMainProcess == Thread.currentThread() ) {
                       GetState();
            objMainProcess.setDaemon( true );
            objMainProcess.start();
        public static void initStatusTimer(){
            if(objTimer == null)
                 objTimer = new javax.swing.Timer( 1000, new java.awt.event.ActionListener(){
                    public void actionPerformed( java.awt.event.ActionEvent evt){
                              SetState();
        private static void SetState(){
            if( objMainProcess == null ) return;
            synchronized( objMainProcess ) {
                bChanged = true;
                try{
                    objMainProcess.notify();
                }catch( IllegalMonitorStateException e ) {}
        private static boolean GetState() {
            if( objMainProcess == null ) return false;
            synchronized( objMainProcess ) {
                if( bChanged) {
                    SendMessage();
                    bChanged = false;
                    return true;
                try {
                    objMainProcess.wait();
                }catch( InterruptedException e ) {}
                return false;
        }

    Thanks DrClap for your reply. Everything you said is right. It is not easy to make them alternate since SetState() could be called from different places where the state could be anything else but a status message. Like a GREETING message for example. It is a handshaking message but not a status message.
    Again as you said, There is a reason I can't call sendMessage() inside setState().
    The only way I was able to do it is by having a counter of the number of notifies that have been called. Every time notify() is called a counter is incremented. Now instead of just checking if "changed" flag is true, I also check if notify counter is greater than zero. If both true, I send the message. If "changed" flag is false, I check again if the notify counter is greater than zero, I send the message. This way it works, but it is kind of a patch than a good design fix. I am yet to find a good solution.
    Thanks,
    B.D.

  • Problem with Threads and "plase wait..."-Window

    Hi everyone,
    I have a problem that I'm not able to solve in any way... I have a time-consuming task (a file decryption) which I execute in a separate thread; I've used the SwingWorker class, like suggested by sun-tutorial, and it works right. The problem is that I have to wait that the decryption have finished before continuing with program-execution. Therefore I would like to display a "please wait"-window while the task runs. I've tryed all the possible ways I know but the problem is always the same: the waitWindow is displayed empty, the bounds are painted but the contents no; it's only painted when the decrypt-task has finished. Please help me, I have no more resources....
    decrypt-file code:
    public class DecryptFile {
      private String cryptedFileNameAndPath;
      private ByteArrayInputStream resultStream = null;
      // need for progress
      private int lengthOfTask;
      private int current = -1;
      private String statMessage;
      public DecryptFile(String encZipFileNameAndPath) {
        cryptedFileNameAndPath = encZipFileNameAndPath;
        //Compute length of task...
        // 0 for indeterminate
        lengthOfTask = 0;
      public ByteArrayInputStream getDecryptedInputStream() {
        return this.resultStream;
       * Called from ProgressBarDemo to start the task.
      public void go() {
        current = -1;
        final SwingWorker worker = new SwingWorker() {
          public Object construct() {
            return new ActualTask();
        worker.start();
       * Called from ProgressBarDemo to find out how much work needs
       * to be done.
      public int getLengthOfTask() {
        return lengthOfTask;
       * Called from ProgressBarDemo to find out how much has been done.
      public int getCurrent() {
        return current;
      public void stop() {
        current = lengthOfTask;
       * Called from ProgressBarDemo to find out if the task has completed.
      public boolean done() {
        if (current >= lengthOfTask)
          return true;
        else
          return false;
      public String getMessage() {
        return statMessage;
       * The actual long running task.  This runs in a SwingWorker thread.
      class ActualTask {
        ActualTask () {
          current = -1;
          statMessage = "";
          resultStream = AIUtil.getInputStreamFromEncZip(cryptedFileNameAndPath); //here the decryption happens
          current = 0;
          statMessage = "";
      }The code that calls decryption and displays waitWindow
          final WaitSplash wS = new WaitSplash("Please wait...");
          final DecryptFile cryptedTemplate = new DecryptFile (this.templateFile);
          cryptedTemplate.go();
          while (! cryptedTemplate.done()) {
            try {
              wait();
            } catch (Exception e) { }
          this.templateInputStream = cryptedTemplate.getDecryptedInputStream();
          wS.close();Thanks, thanks, thanks in advance!
    Edoardo

    Maybe you can try setting the priority of the long-running thread to be lower? so that the UI will be more responsive...

  • Problem with threads and graphics

    I have a thread that chooses paths for a Travelling salesman problem, it then calls a TSPdraw class and passes it the path, which the class then draws. the problem is when i have two threads it creates two windows but only draws a path in one of them. any ideas where i`m going wrong

    Are you using swing components? Swing isn't threadsafe. If you have multiple threads that want to update your UI you need to use the SwingUtilities.invokeLater(...)or invokeAndWait(...). There is a page in the swing tutorial about this at: http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html

  • Problem with threads and ProgressMonitor

    Dear Friends:
    I have a little problem with a thread and a ProgressMonitor. I have a long time process that runs in a thread (the thread is in an separate class). The thread has a ProgressMonitor that works fine and shows the tasks progress.
    But I need deactivate the main class(the main class is the user interface) until the thread ends.
    I use something like this:
    LongTask myTask=new LongTask();
    myTask.start();
    myTask.join();
    Now, the main class waits for the task to end, but the progress monitor don`t works fine: it shows only the dialog but not the progress bar.
    What's wrong?

    Is the dialog a modal dialog? This can block other UI updates.
    In general, you should make sure that it isn't modal, and that your workThread has a fairly low priority so that the UI can do its updating

  • Problem with threads and/or memory

    I'm developing an application where there are 3 threads. One of them sends a request to the other, and if the 2nd can't answer it, it sends it to the 3rd (similar to CPU -> CACHE -> MEMORY). When i run the program with 1000-10.000 requests, no problem occurs. When i run it with 300.000-1.000.000 requests, it sometimes hangs. Is this a problem with the garbage collector, or should it be related to the threads mecanism.
    (note: eache thread is in execution using a finite state machine)

    i had been running the program inside Netbeans.
    Running the jar using the command line outside
    Netbeans i have no more problems... Does Netbeans use
    it's own JVM?Depends how you set it up, but look under the options. There are settings for the compiler and jvm that it uses.

  • Null And " "

    What is the difference between these two lines of codes?
    String currentFile = null;
    String currentFile = "";
    Edited by: AMARSHI on Jul 10, 2008 7:07 AM

    The reference variable itself, takes up the same amount of space, of course, as all references are the same size. Now, the object on the heap is a different story. With null there isn't one, of course (or if there is there is only one for the entire VM), and for the second a String object will be created in the String pool (once again, only one for the entire VM that every = "" assignment will use). But really, what difference does it make? If there is a difference, it is on the order of a few bytes (at max) for the entire VM, and if this is a concern, your probably doing something else greviously wrong. This miniscule difference should not concern you.
    Edit: And "nulling" variables to "save" memory is also not something you should be concerned with. Either the variable will go out of scope and the object garbage collected anyway, or it's in constant use and so will not be taking up any extraneous heap space. If one of those is not the case, you are, once again, doing something greviously wrong.

Maybe you are looking for