Pop-up screen

Hello

I create a popup screen to show the user information.

I use the following code:

public class DisplayPopUp extends {screen

public DisplayPopUp()
{
       
       
HorizontalFieldManager top1 = new HorizontalFieldManager();
ButtonField mySubmitButton = new ButtonField ("Connect");
HorizontalFieldManager top = new HorizontalFieldManager();
ButtonField mySubmitButton1 = new ButtonField("close");
TOP1. Add (mySubmitButton1);
final PopupScreen popUp = new PopupScreen (top1);
       
FieldChangeListener listenerSubmit = new FieldChangeListener() {}
' Public Sub fieldChanged (field field, int context) {}
Add (popUp);
/ * UiApplication.getUiApplication () .invokeLater (new Runnable() {}
public void run()
{
                       
pushScreen (popUp);
}
});
*/
}
};
       
mySubmitButton.setChangeListener (listenerSubmit);
Top.Add (mySubmitButton);
       
Add (Top);
       
}
}
   
It is a very simple application. With a button on the screen, and when the user clicks the button it popup screen with a button.

It gives me state exception illegal when I click my button "connect".

Please provide me with information on how can I achieve this.

Thank you

Rahul

Hello

Well, it's a little embarrassing, I did not have a proper search before posting the problem. I understand what the question was.

Thank you

Rahul

Tags: BlackBerry Developers

Similar Questions

  • I get a pop up screen I need, but the screen is very low and does not allow more than 1 line of information while IE shows the window contextual integers of 27 lines

    I play games that allows me to send gifts to your facebook friends and when I click on send gift, a screen with the names of my friends will be displayed so that I can select the ones to send to... but since yesterday morning, the pop up screen using firefox became so weak that it allows only one line and it does not allow me scroll more than 5 times... While the IE pop-up window shows 27 lines at once, and I can scroll the following 27 and so on... I have pictures of the screen if you need...

    You should be able to resize the window pop - up to enlarge.

    You allow sites resize the popup window?

  • why I get a pop-up screen of Adobe with a question mark when I opened a document that when I answer OK it give me a screen blank

    I try to open a pdf document, and I am presented with a pop-up screen of Adobe with a? and a response OK button.
    In the background, you can see the loading document upward.
    I must respond to the OK, otherwise it will not let me see the document.
    Once I answer, the document looks like a screen empty.

    Hi MarykeVos,

    ·         When exactly do you get this Adobe popup screen?

    ·         That means the pop-up message said?

    ·         What operating system is installed on your computer?

    ·         Did you do changes on the computer before the show?

    You can try to uninstall and reinstall the latest version of Adobe, and check if this solves the problem.

     

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    Let us know if that helps.

  • Pop - up screen "cannot find the file swflash.ocx.

    I frequently get a pop up screen that says 'could not find the swflash.ocx file' - how can I get rid of this?

    You posted on a forum for users of the software program anti-malware for Microsoft Security Essentials (MSE).

    Your problem is related to Flash Player.

    Suggest that you uninstall your current version of flash player to include the use of the Flash Player uninstaller and then download/install the latest version of Flash Player.

    Suggest that you only contact http://www.adobe.com/support/flashplayer/

  • Pop - up screen to record images does not appear when you connect the camera

    Original title: when I plug in my camera to download photos I don't have a pop up screen to ask me some questions were to save you more pictures. I want the pop up screen to come back.
    Guest USB? Download the pictures?

    Hello

    1. Are you referring to the AutoPlay window that appears when you connect a device to the computer?

    What is the number and the model of the camera?

    In case you are referring to the Auto play option then try the troubleshooting steps provided in the link below to fix the problem.

    Troubleshoot AutoPlay

    http://Windows.Microsoft.com/en-us/Windows-Vista/Troubleshoot-AutoPlay-problems

  • How to get rid of a windows pop up screen in Windows Explorer?

    everytime I open windows explore, I get a pop up screen that welcome on a new purchase of a dell computor pre loaded with windows live, then I have to close to open windows explore it is very annoying, I think this has something to with windows live, but I can't understand where and how to get rid of this? can someone help me? Please, I beg you!

    Hello

    It seems that there is a startup item that runs when Windows is loaded.  Please be cleanboot your computer or disable the startup item to prevent it to load.  Here is a link that should prove beneficial.

    http://support.Microsoft.com/kb/331796

    http://support.Microsoft.com/kb/929135

    Thank you

    Aaron
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • How to stop pop-up screen 'See the keyboard, Switch Application, full Menu'?

    Hi all

    I always get this pop-up screen when switching from one screen to the other. I don't know what is the reason for the pop up screen and how to stop it. If you have encountered this problem before and know how to deal with it please give me help.

    The pop-up screen contains the following choices:

    Display the keyboard

    Switch application

    Full menu

    Thank you very much for your help!

    I found the solution to this problem here http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=10933

  • Why a strange menu appears when I pop a screen

    After I pop a screen (the one that allows users to add a contact pre-populated from my code) a small menu will appear which has the following menuitems: save the contact (my addition), hide the keyboard, Application Switch, full Menu.  Contact 'save' is my addition to the menu of the screen being burst.

    This strange menu does not appear when I use the key standard exhaust or menuitem "save the contacts' point, only when I use the Save method or cancel button on my screen.

    All three use the same code - MainUi.popScreen (MainUi.getActiveScreen ());

    Here is the

    Why does this menu appear?

    I use JDE 5.0 in eclipse 3.5.2 with plugin 1.1 and a 9530 Simulator.

    Thanks in advance.

    If your buttons are the ButtonFields standard, you can create them with the style bit ButtonField.CONSUME_CLICK (possibly in addition to other bits of style, you already specified).

  • Button in the pop-up screen problem

    Hi all

    I did a pop-up screen in which there are two buttons and an EditField. Now, I am faced with very weird problem. First button that I added in my code doesnot seem to work. It doesnot clicking and the second button is working well, why is it so can any body help out me of this.

    I provided the code here: -.

    public class PinPopup extends PopupScreen{
    public static  EditField texts;
    static String _userName=null;
    
    PinPopup()
        {
        super(new HorizontalFieldManager());
        Font f = Font.getDefault().derive(Font.BOLD, 16);
        setFont(f);
        texts=new EditField("","",200,Field.EDITABLE);
    
        ButtonField sendButton = new ButtonField(" Send  "){
            protected boolean navigationClick(int status, int time) {
                   Dialog.inform("Send");
                return true;
                }
        };
    
        ButtonField cancelButton = new ButtonField("Cancel"){
             protected boolean navigationClick(int status, int time) {
                   Dialog.inform("Cancel");
                return true;
                }
        };
    
        VerticalFieldManager _fieldManagerContext = new VerticalFieldManager(VerticalFieldManager.USE_ALL_WIDTH | VerticalFieldManager.USE_ALL_HEIGHT)
            {
    
                public void sublayout(int width,int height) {
                    //super.sublayout(width, height);
                    int xpos = 0;
                    int ypos = 0;
                    Field field = getField(0);
                    layoutChild(field, 280, 50);
                    setPositionChild(field, xpos, ypos);
                    Field field1 = getField(1);
                    layoutChild(field1, 280, 50);
                    setPositionChild(field1, xpos+20, ypos+80);
                    Field field2 = getField(2);
                    layoutChild(field2, 280, 50);
                    setPositionChild(field2, xpos+145, ypos+80);
                    setPosition(150, 220);
                    setExtent(300, 220); 
    
                   }
                    public void paint(Graphics graphics)
                    {
                        //graphics.setColor(Color.WHITE);
                        Font f = Font.getDefault().derive(Font.BOLD, 16);
                        graphics.setFont(f);
                        graphics.drawText("SEND PIN",90, 20,0,200);
                        graphics.drawText( _userName,110,40,0,200);
                        graphics.setColor(Color.WHITE);
                        super.paint(graphics);
                    }
    
            }; 
    
                  _fieldManagerContext.add(texts);
                  _fieldManagerContext.add(cancelButton);
                  _fieldManagerContext.add(sendButton);
                  add(_fieldManagerContext);
    
        }
    
    }
    

    Hi Please help me in this

    Thanks in advance

    Why do you not use Horizontalfieldmanager for horizontal alignment.

    This is the code and it works fine.

    package com.winit.mobiads.ui.screens;

    Import net.rim.device.api.ui.Color;
    Import net.rim.device.api.ui.Field;
    Import net.rim.device.api.ui.Font;
    Import net.rim.device.api.ui.Graphics;
    Import net.rim.device.api.ui.component.ButtonField;
    Import net.rim.device.api.ui.component.Dialog;
    Import net.rim.device.api.ui.component.EditField;
    Import net.rim.device.api.ui.container.HorizontalFieldManager;
    Import net.rim.device.api.ui.container.PopupScreen;

    SerializableAttribute public class PinPopup extends PopupScreen {}
    public static EditField texts;
    public static String _userName = null;

    PinPopup()
    {
    Super (new HorizontalFieldManager());
    Police f = Font.getDefault () .derive (Font.BOLD, 16);
    setFont (f);
    texts = new EditField("","",200,Field.EDITABLE);
           
    ButtonField sendButton = new ButtonField ("send") {}
    protected boolean navigationClick (int status, int time) {}
    Dialog.Inform ("Send");
    Returns true;
    }
    };
         
    ButtonField cancelButton = new ButtonField ("Cancel") {}
    protected boolean navigationClick (int status, int time) {}
    Dialog.Inform ("Cancel");
    Returns true;
    }
    };

    HorizontalFieldManager _fieldManagerContext = new HorizontalFieldManager (USE_ALL_WIDTH)
    {
               
    ' public void sublayout (int width, int height) {}
    Super.sublayout (width, height);
    int xPos = 0;
    int yPos = 0;
    Field = getField (0);
                       
    setPositionChild (field, xpos, ypos);
    layoutChild (field, 280, 50);
                       
    Field Field1 = getField (1);
                       
    setPositionChild (Field1, xpos ypos + 80 + 20);
    layoutChild (Field1, 100, 50);

    Field Field2 = getField (2);
                       
    setPositionChild (Field2, xpos ypos + 80 + 145);
    layoutChild (Field2, 100, 50);
                       
    setPosition (150, 220);
    setExtent (width, height);
                        
    }
    public void paint (Graphics graphics)
    {
    graphics.setColor (Color.WHITE);
    Police f = Font.getDefault () .derive (Font.BOLD, 16);
    graphics.setFont (f);
    graphics.drawText ("SEND PIN", 90, 20,0,200);
    graphics.drawText (_userName, 110, 40, 0, 200);
    graphics.setColor (Color.WHITE);
    Super.Paint (Graphics);
    }
             
    };

    _fieldManagerContext.Add (texts);
    _fieldManagerContext.Add (CancelButton);
    _fieldManagerContext.Add (sendButton);
    Add (_fieldManagerContext);
                     
    }

    }

  • Need for a method to be called when the pop-up screen

    Hello

    I have a requirement in my application. I have a screen from which I'm moving to screen B. When I Pop the screen B, I need a method that must be called in the screen has. Looks same as onActivityResult() in Android.

    I am currently using onExpose(). But this method is called for all in the screen has. In the menu click or button also. Is there another way to do this?

    Help, please...

    You have two options I can think immediately, which do not have to change anything in screen B.

    (1) use pushModal when you call B screen.  The statement immediately after the pushModal will be executed as soon as B screen is popped.  In general, I try to avoid the modal screens, but in this case, it's probably what I would do.

    (2) set an indicator immediately before you tap screen B.  Test the flag in onExposed().  If the flag is not set, then the onExposed was called for another reason and you can ignore it.  If the flag is set, then turn him off and process you want, knowing that the screen that has been exposed as screen B jumped.

    Either should work for you.

  • How to center the button on the pop-up screen

    Look at the picture, I've created a popup screen click the menu key and I have that transparent and make it mode full screen and I added four buttons vertically please, u can correct me how can I Center this button in the pop up screen.

    Here is my code

    if (Keypad.key(keycode) == Keypad.KEY_MENU)
            {
                  MysettingMenu mymenu = new MysettingMenu();
                  UiApplication.getUiApplication().pushModalScreen(mymenu);
                System.out.println("--------------Menu -key -Pressed-----------------");
    
            }
     public class MysettingMenu extends PopupScreen{
             public MysettingMenu(){
                 super(new VerticalFieldManager(), Screen.DEFAULT_CLOSE); 
    
                 this.setBackground(BackgroundFactory.createSolidTransparentBackground(Color.WHITE, 80));
    
                 setBorder(BorderFactory.createSimpleBorder(new XYEdges(),Border.STYLE_TRANSPARENT));
    
                 this.add(new ButtonField("Favourites"));
                 this.add(new ButtonField(" Settings "));
                 this.add(new ButtonField("  About    "));
                 this.add(new ButtonField("  Exit    "));
    
             }
    
            protected void sublayout(int width, int height) {
                // TODO Auto-generated method stub
                 super.sublayout(Display.getWidth(), Display.getHeight());
                  setExtent(Display.getWidth(),Display.getHeight());
                  int leftMargin = (Display.getWidth() - width)/8;
                  int topMargin = (Display.getHeight() - height)/8;
                  setPosition(leftMargin, topMargin);
            }
    
         }
    

    There are a variety of ways that this could be done, but in your case the easiest is to allow the screen to use only as much space as it needs and then place it at the Center.

    Then

    (1) change this call

    Super.sublayout (Display.GetWidth (), Display.getHeight ());

    in fact, supply the same width and height that you have been given.

    (2) remove this:

    setExtent (Display.getWidth (), Display.getHeight ());

    (3) change margin settings so that they use the actual width and height, and on this basis.  For example:

    leftMargin = int (Display.getWidth () - this.getWidth (()) / 2;

    By the way, I recommend strongly that you never call super.layout (...) ignore the size that he gave you and you deliver own setExtent.  Unless you know what you are doing, this can cause fields to display incorrectly.  If you think that you must set your own size, then I suggest you create your own Manager and do you do the layout.  More information on that here:

    http://supportforums.BlackBerry.com/T5/Java-development/how-to-extend-Manager/Ta-p/446749

  • How to find and pop a screen custom battery Global display

    I pushed a form customized to a global stack by using pushGlobalScreen, when a call disconnected.

    is it possible to control this form exists in the Global display stack and how I pop this screen?

    No, you need a reference to the screen

  • How to close the pop-up screen with timer

    Hello

    How to close pop-up display with timer .assuming I want to close pop-up screen after 10 seconds please share code me complete.

    Hello

    See this sample program,

    import java.util.Timer;
    import java.util.TimerTask;
    
    import net.rim.device.api.ui.Field;
    import net.rim.device.api.ui.FieldChangeListener;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.ButtonField;
    import net.rim.device.api.ui.component.LabelField;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.container.PopupScreen;
    import net.rim.device.api.ui.container.VerticalFieldManager;
    
    public class Example extends UiApplication {
        public static void main(String[] args) {
            Example app = new Example();
            app.enterEventDispatcher();
        }
    
        public Example() {
            pushScreen(new ExampleScreen());
        }
    
        private class ExampleScreen extends MainScreen {
            public ExampleScreen() {
    
                ButtonField but = new ButtonField("Click",ButtonField.CONSUME_CLICK);
                but.setChangeListener(new FieldChangeListener() {
    
                    public void fieldChanged(Field field, int context)
                    {
                        UiApplication.getUiApplication().pushScreen(new exmplePopup());
    
                    }
                });
    
                add(but);
            }
        }
    
        private class exmplePopup extends PopupScreen
        {
    
            public exmplePopup()
            {
                super(new VerticalFieldManager());
                GuestPop p=new GuestPop();
                add(p);
            }
    
            public class GuestPop extends VerticalFieldManager
            {
                public GuestPop()
                {
                    add(new LabelField("Hi How r u"));
    
                    Timer timer  = new Timer();
                     timer.schedule(new CountDown(), 5000);
                }
    
            }
    
            private class CountDown extends TimerTask {
                public void run() {
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
    
                        }
                    });
    
                }
            }
    
        }
    }
    

    Here, I've given 5 seconds.

    Thank you.

  • display a pop up screen closes and "install windows" automatically

    Hello... I use sony vaio... windows 7...  When using my laptop... it shows a pop up screen for farm and "install windows" automatically... so it's frequently when using. Please provied any solution or software bind it to reslove. Thanks in advance

    Hello

    Method 1:

    Run the fixit available at the following link.

    Solve problems with programs that cannot be installed or uninstalled

    http://support.Microsoft.com/mats/Program_Install_and_Uninstall

    Method 2:

    Step 1: Perform a clean boot.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

    Note: Once you are done with the boot, follow step 7 of article to put your computer to normal startup.

    Step 2: Uninstall the program now and check.

    Uninstall or change a program

    http://Windows.Microsoft.com/en-us/Windows7/uninstall-or-change-a-program

    I hope this helps.

  • How to create pop-up screens?

    Hello, I try to recreate this Web page

    http://fkatwi.GS/#

    However, I am confused how I can create the pop-up screens that appear when you click on a navigation link.

    Also is there a way to imitate the smooth transition?

    Thank you!

    You can do this by using blank publication and then set the parameter to lightbox

  • How can I disable this pop-up screen?

    I want to stop this screen from popping up every time I have set my volume level.  I want to keep the functionality of my buttons, and I still want the clatter when I touch the buttons, I just don't want to come here.

    How can I do so?

    Hello tock172,

    The only way I found to stop this popup is to disable the quick launch the utility Configuration of Microsoft HP VolumeDisplay, but it will also turn off the sound by clicking (I think)...

    Click Start > type "MSCONFIG" in Start Search > click MSCONFIG in the list of programs

    Then click on the Startup tab and then uncheck the item for HPVOLUMEDISPLAY (forgot the exact name) and then click APPLY and then CLOSE and restart

Maybe you are looking for

  • Satellite P840 Win8 - touchpad stops intermittently to answer

    Hi, I got my new laptop for 24 hours, and that I have lived two times a situation whereby the touchpad no longer permanently, by requiring that the computer be reset (which ' solve' the problem). In addition to this, I experienced intermittent freeze

  • Microsoft Corporation Lottery promotion,

    Hi dear, I got the following email Is this true? so thank you Microsoft Corporation Lottery promotion,The customer service.Your winner of the lot no.: HLS/LTY/2901Your victory reference: Lb/029/2910 NOTIFICATION OF THE OFFICIAL WINNER. We are pleased

  • Dell printer will not print

    Why can I not use my dell printer to print?

  • Reference Dell 6850 don't RAID not installation

    Hello world hope you might me able to help me, I recently acquired a dell server 6850, she has 1 x 73 GB scsi. How to configure the computer bios so that she sees as a normal non-raid drive... This is not a production server just to test... Once I ha

  • isolated for laboratories network

    Hej AllI want to create an internal network to my domain controller, I want to get updates if the host machine, but do not want to leave the domain in any of my business network controller getsIs the right way to1 card network connected to create the