Open a custom dialog when button is pressed.

I have a custom dialog that I want to display another custom dialog. I cannot get it work correctly. Everytime I add a function that will show the 2nd dialog It will show before the 1st one is loaded and then nothing happens when I click the dialog on the first!
I seem to be missing something big? I have not even started to try to get the value of the 2nd dialog and return it to the first!
Any help!!!!?
Here is some of the code
function showAddTokenDialog ()
    LrFunctionContext.callWithContext('showAddTokenDialog', function( context )
        local f = LrView.osFactory()
        tokenprops  = LrBinding.makePropertyTable(context)
        props.token = "val"
        -- Create the contents for the dialog.
        local token = LrView.bind('token')
        local AddTokenDialog = {
            bind_to_object = tokenprops,
            title = "Add Token",
            actionVerb = "Add Token",
            actionBinding = LrView.bind('action'),
            contents = f:row {               
                f:static_text {
                    alignment = "right",
                    width = LrView.share "label_width",
                    title = "Token "                   
                f:popup_menu {
                    value = LrView.bind('val'),
                    items = tokenItems,
                    width_in_chars = 15
        result = LrDialogs.presentModalDialog(AddTokenDialog)
    end)
end
function Mine.showCustomDialog()
    LrFunctionContext.callWithContext("showCustomDialogWithObserver", function(context)
        props = LrBinding.makePropertyTable(context)
          local c = f:row {
                                        f:static_text {
                                            alignment = "right",
                                            --width = LrView.share "label_width",
                                            title = "Caption: ",
                                            width_in_chars = 10
                                        f:edit_field {
                                            --place_horizontal = 0.5,
                                            --bind_to_object = tableTwo,
                                            value = '',
                                            height_in_lines = 2,
                                            width_in_chars = 20
                                        f:push_button {
                                            title = "Add Token",
                                            -- When the 'Update' button is clicked
                                            font = '<system/small>',
                                            action = showAddTokenDialog ()
          LrDialogs.presentModalDialog(
                title = "Barcode Match",
                contents = c
    end) -- end main function
     end

See http://htmldb.oracle.com/pls/otn/f?p=24317:91
The Toggle button does what you need.
The button has a URL of Toggle(). The function Toggle
is defined as
<script>
function Toggle()
var txt=html_GetElement('P91_TEXT');
txt.disabled=!txt.disabled;
if (!txt.disabled) txt.focus();
</script>
I don't want to seem ignorant but where do I put this code of the function toggle. I don't seem to see a URL anywhere in the button. Maybe I'm using a different button type then you.
Aron

Similar Messages

  • Can I get iMovie to stop opening the camera dialog when I connect my iPod Touch?

    Can I get iMovie to stop opening the camera dialog when I connect my iPod Touch?

    Troubleshooting extensions and themes
    * https://support.mozilla.com/en-US/kb/Troubleshooting%20extensions%20and%20themes
    Restore the default home page
    * https://support.mozilla.com/en-US/kb/How%20to%20set%20the%20home%20page#w_restore-the-default-home-page
    Check and tell if its working.

  • Open URL Website from WHEN BUTTON PRESSED

    I need to open an internal website when a button is pressed on Forms 9i, which is the best and simplist way to go about it, using the available inbuilt forms 9i functions.
    Any ideas?????

    Hello,
    Use the Web.Show_Document() built-in.
    Francois

  • Frame layout changes when button is pressed again...

    Okay so basically I have a button on my frame and when it's pressed it opens up another frame. This is fine, but when the button is pressed again it opens up the frame again but the layout is all over the place.
    Here is the code:
    if (ev.getSource() == seating)
    else
                   seatdisplay = new JFrame("Seating Display");
                   seatdisplay.getContentPane().setBackground(Color.orange);
                   seatdisplay.setLayout(new BorderLayout()); //Define border layout
                   seatdisplay.setVisible(true);
                   seatdisplay.setSize(550,500);
                   seatdisplay.add(panelLeft, BorderLayout.WEST); //Position object to the west
                   seatdisplay.add(panelMiddle, BorderLayout.CENTER);
                   seatdisplay.add(panelRight, BorderLayout.EAST);
                   seatdisplay.add(panelTop, BorderLayout.NORTH);
                   seatdisplay.add(panelBottom, BorderLayout.SOUTH);
                   panelLeft.setLayout(new GridLayout(4,2)); //Define new grid layout
                   panelLeft.setBackground(Color.black);
                   panelLeft.add(a1 = new JButton("A1")); //Add buttons
                   panelLeft.add(a2 = new JButton("A2"));
                   panelLeft.add(a3 = new JButton("A3"));
                   panelLeft.add(a4 = new JButton("A4"));
                   panelLeft.add(a5 = new JButton("A5"));
                   panelLeft.add(a6 = new JButton("A6"));
                   panelLeft.add(a7 = new JButton("A7"));
                   panelLeft.add(a8 = new JButton("A8"));
                   panelMiddle.setLayout(new GridLayout(3,6));
                   panelMiddle.setBackground(Color.orange);
                   panelMiddle.add(empty = new JButton("")); empty.setVisible(false);
                   panelMiddle.add(b1 = new JButton("B1"));
                   panelMiddle.add(b2 = new JButton("B2"));
                   panelMiddle.add(b3 = new JButton("B3"));
                   panelMiddle.add(b4 = new JButton("B4"));
                   panelMiddle.add(empty3 = new JButton("")); empty3.setVisible(false);
                   panelMiddle.add(empty1 = new JButton("")); empty1.setVisible(false);
                   panelMiddle.add(b5 = new JButton("B5"));
                   panelMiddle.add(b6 = new JButton("B6"));
                   panelMiddle.add(b7 = new JButton("B7"));
                   panelMiddle.add(b8 = new JButton("B8"));
                   panelMiddle.add(empty4 = new JButton("")); empty4.setVisible(false);
                   panelMiddle.add(empty2 = new JButton("")); empty2.setVisible(false);
                   panelMiddle.add(b9 = new JButton("B9"));
                   panelMiddle.add(b10 = new JButton("B10"));
                   panelMiddle.add(b11 = new JButton("B11"));
                   panelMiddle.add(b12 = new JButton("B12"));
                   panelRight.setLayout(new GridLayout(4,2));
                   panelRight.setBackground(Color.black);
                   panelRight.add(c1 = new JButton("C1"));
                   panelRight.add(c2 = new JButton("C2"));
                   panelRight.add(c3 = new JButton("C3"));
                   panelRight.add(c4 = new JButton("C4"));
                   panelRight.add(c5 = new JButton("C5"));
                   panelRight.add(c6 = new JButton("C6"));
                   panelRight.add(c7 = new JButton("C7"));
                   panelRight.add(c8 = new JButton("C8"));
    }The seat button is pressed and seatdisplay frame is opened, however, if I press the seat button twice another seatdisplay frame is opened and the layout is all over the place. Do I need to do some sort of refresh?

    Swing related questions should be posted in the Swing forum.
    If you need further help then you need to create a "Short, Self Contained, Compilable and Executable, Example Program (SSCCE)", that demonstrates the incorrect behaviour.
    http://homepage1.nifty.com/algafield/sscce.html
    Don't forget to use the "Code Formatting Tags", so the posted code retains its original formatting.
    http://forum.java.sun.com/help.jspa?sec=formatting

  • Actionscript 3.0 when button is pressed twice turns on/off

    Alright I am new at actionscript but what I wanna do is when my button it is pressed once it brings up my input text("hiddentext") and when its pressed again it will remove it.
    here is what I got.
    button1_btn.addEventListener(MouseEvent.CLICK, shoot_1);
    function shoot_1(event:MouseEvent):void
              gotoAndStop("hiddentext");{
    and shoot_1 is just the identifier to make them work together.
    Message was edited by: dogmer punchy

    A nice clean way of dealing with this is to put the text inside a movieclip and control the visibility of the movieclip with the button, toggling it to be the opposite of what it currently is.  If you were to assign an instance name to that movieclip like "hiddenText", the code for toggling it could be...
    button1_btn.addEventListener(MouseEvent.CLICK, shoot_1);
    function shoot_1(event:MouseEvent):void
              hiddenText,visible = !hiddenText.visible;
    The use of the " ! " tells it to be what it is not.

  • Stop displaying a message when button is pressed more than one

    Hi
    I have a forms with button 'save' and when user pressed this button i do some checks and display a message, what i want is to display the message only the first time user presses the button, if user presses the button again and again, message should not be displayed...but i do not know how to fix this, has someone an idea? Thanks.

    Take a look at About Global Variables. You might also want to bookmark the Oracle Forms Documentation web site.
    Basically, you will use a Global Variable as a counter. In your button code, you check the value of the Global Var to see if it is greater than 1. If it is, you exit. If it is not (in other words the Global is equal to zero) then you add 1 to the variable and you display your message. Pretty basic stuff.
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • N73 Wrong Value When Button '2' Pressed among othe...

    Hi
    I am having problems with my N73 and I need some advice please. A couple of weeks ago, I suddenly found that when I pressed the 2 key, I got a 7 instead. I turned the phone off and then on again and it fixed it, temporarily. I then discovered that other buttons were doing strange things. The * button give *9 and the Cancel button does something very strange.
    Now, even turning the phone off and on doesn't clear it. The other buttons I have not mentioned appear to be unaffected.
    I have since updated the firmware, performed the 3 button reset and almost every other thing I have seen about resetting your phone but with no success.
    If anyone has any idea of what I can do to rectify this, I would be very keen to hear your thoughts.
    Many thanks,
    Peter

    Hello - sounds like the keypad circuit is up the swanny!
    i had the same problem with mine, i took the gamble of buying a used original n73 keypad/toggle thru ebay, fitted it, works fine now!.
    but as always, just coz it worked for me, it may not be the case for you.
    as you have reset/formatted the phone, i dont see what else it could be.
    good luck
    Markkyboy

  • How to change an image only when button is pressed

    is there an easy way to make the image in a uiimageview change to a different image while a button is being pressed? then, once the user stops pressing the button, the image view needs to return to the first image.
    thanks in advance!

    Hey , U can handle that with Touches ,
    But in a simply way
    Use Touchupinside to show the pressed image ,
    and use Touchupouside to show the normal image.
    This may give you the same  impression.
    Thanks
    Srikanth

  • Re: have two panels, when button is pressed want second panel to show.

    Please help:
    I working with a very simple applet program.
    All I want to do is when I click a button a new panel shows up and the earlier one disappers. Like you see
    when you fill up online forms.
    I am doing this with JPanels with setvisible true/false.
    The program should work but when I click on the button the second panel deos not show up.
    Please tell me what I am doing wrong...
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    <applet code = "PanelTest.class" width=500 height=250>
    </applet>
    public class PanelTest extends JApplet {
    Container cnt;
    JPanel jpanel1, jpanel2;
    JPanel mainjpanel;
    public void init()
    cnt = getContentPane();
    mainjpanel = new JPanel();
    cnt.add(mainjpanel);
    jpanel1 = new JPanel();
    JButton jbutton1 = new JButton("Account information");
    jpanel1.setVisible(true);
    jpanel1.add(jbutton1);
    mainjpanel.add(jpanel1);
    ButtonAction ba = new ButtonAction();
    jbutton1.addActionListener(ba);
    jpanel2 = new JPanel();
    JButton jbutton2 = new JButton("Save");
    jpanel2.setVisible(false);
    jpanel2.add(jbutton2);
    mainjpanel.add(jpanel2);
    class ButtonAction implements ActionListener
    { public void actionPerformed(ActionEvent ae)
    { String name = ((JButton)ae.getSource()).getText();
    if (name.equals("Account information"))
    jpanel1.setVisible(false);
    jpanel2.setVisible(true);
    }

    Hi,
    here is a link http://java.sun.com/docs/books/tutorial/uiswing/layout/card.html
    with an example of using CardLayout and managing more than one component in an applet.
    Hope it helps
    regards

  • Textfield does not change when button is pressed

    I am trying to get the first textfield in the middle panel to change when I change the values of the textfields in the bottommost panel.
    I know that some things in my code are quite messy. please excuse me. Here is the code
    import java.lang.Integer;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.font.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.awt.event.ItemListener;
    import java.awt.event.ItemEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    import javax.swing.*;
    import java.awt.Graphics.*;
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import javax.swing.JApplet.*;
    import javax.swing.JFrame.*;
    import java.applet.Applet;
    import javax.swing.border.*;
    import javax.swing.Spring.*;
    import java.awt.geom.AffineTransform;
    import java.awt.Graphics2D;
    //Class definition
    public class Shapeshift extends JApplet{
    //testing
    private JButton buttons[] = new JButton[64];
    private Double myu;
    private int startmyu = 0;
    int xL;
    Double Len;
    Double reluctance;
    private int x;
    private int a;
    private int b;
    private int c;
    private int dd;
    private int q;
    private int f;
    private int z;
    private int aR;
    private int ar;
    private int aH;
    private int ah;
    private int at;
    private int al;
    private int xL2;
    private int x2;
    private int xx2;
    private CardLayout Magnet;
    private JButton controls[];
    private JPanel deck;
    int hhh = 700;
    int wwww = 700;
    int www = 350;
    int y = 300;
    int g= 5;
    int w = 20;
    int h = 10;
    int panelheight = 100;
    int panelwidthgr = 510;
    int panelwidth = 540;
    int panelheight2 = 300;
    int panelwidthV = 500;
    //Text
    int ty = 20;
    int tx = 10;
    int twid = 40;
    int thei = 20;
    int bwid = 20;
    int bhei = 10;
    int ly = 2;
    //Defining textfields
    JTextField Lfield = new JTextField(5);
    JTextField L2field = new JTextField(5);
    JTextField Rfield = new JTextField(5);
    JTextField rfield = new JTextField(5);
    JTextField Hfield = new JTextField(5);
    JTextField tfield = new JTextField(5);
    JTextField hfield = new JTextField(5);
    JTextField lfield = new JTextField(5);
    JTextField LLfield = new JTextField(5);
    JTextField LL2field = new JTextField(5);
    JTextField RRfield = new JTextField(5);
    JTextField rrfield = new JTextField(5);
    JTextField HHfield = new JTextField(5);
    JTextField ttfield = new JTextField(5);
    JTextField hhfield = new JTextField(5);
    JTextField llfield = new JTextField(5);
    JLabel Llabel = new JLabel("L(mm)");
    JLabel L2label = new JLabel("L2(mm)");
    JLabel Rlabel = new JLabel("R(mm)");
    JLabel rlabel = new JLabel("r(mm)");
    JLabel llabel = new JLabel("l(mm)");
    JLabel tlabel = new JLabel("t(mm)");
    JLabel Hlabel = new JLabel("H(mm)");
    JLabel hlabel = new JLabel("h(mm)");
    //MAFV calculator----------------------------------------------------------------------
    JTextField Vfield = new JTextField(5);
    JTextField VVfield = new JTextField(5);
    JTextField kfield = new JTextField(5);
    JTextField kkfield = new JTextField(5);
    JTextField etafield = new JTextField(5);
    JTextField etaefield = new JTextField(5);
    JTextField taofield = new JTextField(5);
    JTextField taotfield = new JTextField(5);
    JTextField lamfield = new JTextField(5);
    JTextField lamlfield = new JTextField(5);
    JTextField wfield = new JTextField(5);
    JTextField wwfield = new JTextField(5);
    JLabel Vlabel = new JLabel("Volume (mm^3)");
    JLabel klabel = new JLabel("k(mm)");
    JLabel etalabel = new JLabel("eta(mm)");
    JLabel taolabel = new JLabel("tao(mm)");
    JLabel lamlabel = new JLabel("lambda(mm)");
    JLabel wlabel = new JLabel("Mechanical Power Dissipation(mm)");
    //Torque Calculator--------------------------------------------------------------------
    JTextField Tfield = new JTextField(5);
    JTextField tyfield = new JTextField(5);
    JTextField rofield = new JTextField(5);
    JTextField rifield = new JTextField(5);
    JLabel Tlabel = new JLabel("T");
    JLabel tylabel = new JLabel("tao_y");
    JLabel rolabel = new JLabel("r_o");
    JLabel rilabel = new JLabel("r_i");
    //Reluctance Calculator----------------------------------------------------------------
    JTextField Relfield = new JTextField(5);
    JTextField Lenfield = new JTextField(5);
    JTextField myufield = new JTextField(5);
    JTextField Afield = new JTextField(5);
    JLabel Rellabel = new JLabel("R");
    JLabel Lenlabel = new JLabel("L");
    JLabel myulabel = new JLabel("myu");
    JLabel Alabel = new JLabel("A");
    //Magnetic Flux Density calculator----------------------------------------------------------------
    JTextField Bfield = new JTextField(5);
    JTextField Nfield = new JTextField(5);
    JTextField Ifield = new JTextField(5);
    JTextField Relufield = new JTextField(5);
    JLabel Relulabel = new JLabel("R");
    JLabel Blabel = new JLabel("B");
    JLabel Nlabel = new JLabel("N");
    JLabel Ilabel = new JLabel("I");
    //Shear stress calculator----------------------------------------------------------------
    JTextField taufield = new JTextField(5);
    JTextField Qfield = new JTextField(5);
    JTextField SHfield = new JTextField(5);
    JTextField Infield = new JTextField(5);
    JTextField thicknessfield = new JTextField(5);
    JLabel taulabel = new JLabel("Tau");
    JLabel Qlabel = new JLabel("Q");
    JLabel SHlabel = new JLabel("V");
    JLabel Inlabel = new JLabel("I");
    JLabel thicknesslabel = new JLabel("t");
    //Normal stress calculator----------------------------------------------------------------
    JTextField Mxfield = new JTextField(5);
    JTextField Myfield = new JTextField(5);
    JTextField Ixfield = new JTextField(5);
    JTextField Iyfield = new JTextField(5);
    JTextField cfield = new JTextField(5);
    JTextField sigfield = new JTextField(5);
    JLabel Mxlabel = new JLabel("M_x");
    JLabel Mylabel = new JLabel("M_y");
    JLabel Ixlabel = new JLabel("I_x");
    JLabel Iylabel = new JLabel("I_y");
    JLabel clabel = new JLabel("c");
    JLabel siglabel = new JLabel("sigma");
    public void init() {
    class MyDrawingPanel extends JPanel{
    public void paintComponent(Graphics g){
    super.paintComponent(g);
    Graphics2D g2 = (Graphics2D) g;
    Dimension d = getSize();
    int ww = 350;
    int hh = 350;
    int w = d.width;
    int h = d.height;
    int z = 1 + (int)(Integer.parseInt(hfield.getText())) + (int)(Integer.parseInt(Rfield.getText()));
    int xx = 1 + (int)(Integer.parseInt(hfield.getText())) + (int)(Integer.parseInt(Rfield.getText())) + (int)(Integer.parseInt(tfield.getText()));
    int xxx = 1 + (int)(Integer.parseInt(rfield.getText())) + (int)(Integer.parseInt(Rfield.getText()));
    AffineTransform saveXform = g2.getTransform();
    AffineTransform toCenterAt = new AffineTransform();
    toCenterAt.translate(w/2, h/2);
    g2.transform(toCenterAt);
    g2.setColor(Color.yellow);
    g2.fillRect(-25, -30-z, 25+x, 10+f);
    g2.fillRect(-25, 70+a, 25+x, 10+f);
    g2.fillRect(50+c, -30-z, 25+x2, 10+f);
    g2.fillRect(50+c, 70+a, 25+x2, 10+f);
    g2.setColor(Color.blue);
    g2.fillRect(-25, -40-xx, 100+c+x2, 10 + dd);
    g2.fillRect(-25, 80+z, 100+c+x2, 10+dd);
    g2.setColor(Color.gray);
    g2.drawLine(-30, 15-b, 90+x2+c, 15-b);
    g2.drawLine(-30, 35+b, 90+x2+c, 35+b);
    g2.fillRect(x, 0+q, 50-x+c, 50-(2*q));
    g2.fillRect(-25, -20-a, x + 25, 90+(2*a));
    g2.fillRect(50+c, -20-a, 25+x2, 90+(2*a));
    //R arrow-----------------------------------------------------------------------------------------------------------
    g2.drawLine(95+x2+c, 25, 95+x2+c, -20 - a);
    g2.drawLine(95+x2+c, -20-a, 90+x2+c, -17-a);
    g2.drawLine(95+x2+c, -20-a, 100+x2+c, -17-a);
    //r arrow-----------------------------------------------------------------------------------------------------------
    g2.drawLine(115+x2+c, 25, 115+x2+c, 15 - b);
    g2.drawLine(115+x2+c, 15 - b, 110+x2+c, 18 - b);
    g2.drawLine(115+x2+c, 15 - b, 120+x2+c, 18 - b);
    //vertical lines------------------------------------------------------------------------------------------------------
    g2.drawLine(-25, 100 + a+dd+f, -25, 140 + a+dd+f);
    g2.drawLine(0+x, 100 + a+dd+f, 0+x, 140 + a+dd+f);
    g2.drawLine(50-x+c, 100 + a+dd+f, 50-x+c, 140 + a+dd+f);
    g2.drawLine(75+x2+c, 100 + a+dd+f, 75+x2+c, 140 + a+dd+f);
    //bottom horizontal line----------------------------------------------------------------------------------------------
    g2.drawLine(-25, 120 + a+dd+f, 75+x2+c, 120 + a+dd+f);
    //Letters-------------------------------------------------------------------------------------------------------------
    g2.drawString("L1",-21,110+a+dd+f);
    g2.drawString("L2",62+x2,110+a+dd+f);
    g2.drawString("l",25,110+a+dd+f);
    g2.drawString("R",100+x2+c,10);
    g2.drawString("r",120+x2+c,10);
    repaint();
    // other drawing/painting code here
    MyDrawingPanel mdp = new MyDrawingPanel();
    //getContentPane().add(mdp, java.awt.BorderLayout.EAST);
    //Defining panels-------------------------------------------------------------------------
    JPanel dimension = new JPanel();
    JPanel dimension1 = new JPanel();
    JPanel MAFV = new JPanel();
    JPanel Torque = new JPanel();
    JPanel Reluctance = new JPanel();
    JPanel MFD = new JPanel();
    deck = new JPanel();
    JPanel NS = new JPanel();
    JPanel SS = new JPanel();
    //Setting initial text values to zero
    int start = 0;
    int startL = 25;
    int startR = 45;
    int startr = 15;
    int starth = 10;
    int startH = 15;
    int startt = 10;
    int startl = 50;
    //Setting MAFV fields to zero------------------------------------------------------------------
    Relfield.setText(start + "");
    myufield.setText(start + "");
    wfield.setText(start + "");
    etafield.setText(start + "");
    lamfield.setText(start + "");
    taofield.setText(start + "");
    kfield.setText(start +"");
    VVfield.setText(start + "");
    LLfield.setText(startL + "");
    L2field.setText(start + "");
    Rfield.setText(start + "");
    rfield.setText(start + "");
    lfield.setText(start + "");
    tfield.setText(start + "");
    Hfield.setText(start + "");
    hfield.setText(start + "");
    LL2field.setText(startL + "");
    RRfield.setText(startR + "");
    rrfield.setText(startr + "");
    llfield.setText(startl + "");
    ttfield.setText(startt + "");
    HHfield.setText(startH + "");
    hhfield.setText(starth + "");
    Lfield.setText(start +"");
    //Setting up SpringLayout
    SpringLayout spring = new SpringLayout();
    SpringLayout spring2 = new SpringLayout();
    SpringLayout spring3 = new SpringLayout();
    SpringLayout spring4 = new SpringLayout();
    SpringLayout spring5 = new SpringLayout();
    SpringLayout spring6 = new SpringLayout();
    SpringLayout spring7 = new SpringLayout();
    SpringLayout spring8 = new SpringLayout();
    Magnet = new CardLayout();
    deck.setLayout(Magnet);
    deck.add(Reluctance, "Reluctance");
    deck.add(MFD, "Magnetic Flux Density");
    //Defining main container--------------------------------------------------------------
    Container c = getContentPane();
    //Color black = Color.black;
    //c.setBackground(black);
    //Defining buttons(in an array)-----------------------------------------------------------
    buttons[0] = new JButton("UP");
    buttons[1] = new JButton("DOWN");
    buttons[2] = new JButton("UP");
    buttons[3] = new JButton("DOWN");
    buttons[4] = new JButton("UP");
    buttons[5] = new JButton("DOWN");
    buttons[6] = new JButton("UP");
    buttons[7] = new JButton("DOWN");
    buttons[8] = new JButton("UP");
    buttons[9] = new JButton("DOWN");
    buttons[10] = new JButton("UP");
    buttons[11] = new JButton("DOWN");
    buttons[12] = new JButton("UP");
    buttons[13] = new JButton("DOWN");
    buttons[14] = new JButton("DOWN");
    buttons[15] = new JButton("UP");
    buttons[16] = new JButton("DOWN");
    buttons[17] = new JButton("UP");
    buttons[18] = new JButton("DOWN");
    buttons[19] = new JButton("UP");
    buttons[20] = new JButton("DOWN");
    buttons[21] = new JButton("UP");
    buttons[22] = new JButton("DOWN");
    buttons[23] = new JButton("UP");
    buttons[24] = new JButton("DOWN");
    buttons[25] = new JButton("UP");
    buttons[26] = new JButton("DOWN");
    buttons[27] = new JButton("DOWN");
    buttons[28] = new JButton("UP");
    buttons[29] = new JButton("DOWN");
    buttons[30] = new JButton("UP");
    buttons[31] = new JButton("DOWN");
    buttons[32] = new JButton("UP");
    buttons[33] = new JButton("DOWN");
    buttons[34] = new JButton("UP");
    buttons[35] = new JButton("DOWN");
    buttons[36] = new JButton("UP");
    buttons[37] = new JButton("DOWN");
    buttons[38] = new JButton("UP");
    buttons[39] = new JButton("DOWN");
    buttons[40] = new JButton("DOWN");
    buttons[41] = new JButton("UP");
    buttons[42] = new JButton("DOWN");
    buttons[43] = new JButton("UP");
    buttons[44] = new JButton("DOWN");
    buttons[45] = new JButton("UP");
    buttons[46] = new JButton("DOWN");
    buttons[47] = new JButton("UP");
    buttons[48] = new JButton("DOWN");
    buttons[49] = new JButton("UP");
    buttons[50] = new JButton("DOWN");
    buttons[51] = new JButton("UP");
    buttons[52] = new JButton("DOWN");
    buttons[53] = new JButton("DOWN");
    buttons[54] = new JButton("UP");
    buttons[55] = new JButton("DOWN");
    buttons[56] = new JButton("UP");
    buttons[57] = new JButton("DOWN");
    buttons[58] = new JButton("UP");
    buttons[59] = new JButton("DOWN");
    buttons[60] = new JButton("UP");
    buttons[61] = new JButton("DOWN");
    buttons[62] = new JButton("UP");
    buttons[63] = new JButton("DOWN");
    //Adding events to buttons in array-------------------------------------------------------
    buttons[1].addActionListener(new T2C());
    buttons[2].addActionListener(new T3C());
    buttons[3].addActionListener(new T4C());
    buttons[4].addActionListener(new T5C());
    buttons[5].addActionListener(new T6C());
    buttons[6].addActionListener(new T7C());
    buttons[7].addActionListener(new T8C());
    buttons[8].addActionListener(new T9C());
    buttons[9].addActionListener(new T10C());
    buttons[10].addActionListener(new T11C());
    buttons[11].addActionListener(new T12C());
    buttons[12].addActionListener(new T13C());
    buttons[13].addActionListener(new T14C());
    buttons[16].addActionListener(new T20C());
    buttons[17].addActionListener(new T21C());
    buttons[20].addActionListener(new T22C());
    buttons[21].addActionListener(new T23C());
    buttons[18].addActionListener(new T29C());
    buttons[19].addActionListener(new T28C());
    buttons[22].addActionListener(new T24C());
    buttons[23].addActionListener(new T25C());
    buttons[24].addActionListener(new T26C());
    buttons[25].addActionListener(new T27C());
    buttons[58].addActionListener(new T1B());
    buttons[59].addActionListener(new T1A());
    //L2button
    buttons[62].addActionListener(new T16C());
    buttons[63].addActionListener(new T17C());
    //Buttons for Card Layout--------------------------------------------------------------
    controls = new JButton[2];
    controls[0] = new JButton("UP");
    controls[1] = new JButton("DOWN");
    //controls[0].addActionListener(new T15C());
    //controls[1].addActionListener(new T15C());
    c.setLayout(spring);
    Spring hhhheight = Spring.constant(hhh);
    Spring wwwidth = Spring.constant(wwww);
    Spring wwidth = Spring.constant(www);
    Spring width = Spring.constant(w);
    Spring height = Spring.constant(h);
    Spring xvalue = Spring.constant(g);
    Spring yvalue = Spring.constant(y);
    Spring xxvalue = spring.getConstraint(SpringLayout.WEST, c);
    Spring yyvalue = spring.getConstraint(SpringLayout.SOUTH, c);
    //Panel 1 parameters
    Spring panwidV = Spring.constant(panelwidthV);
    Spring panygr = Spring.constant(panelwidthgr);
    Spring panwidthr = spring.getConstraint(SpringLayout.EAST, c);
    Spring panheight2 = Spring.constant(panelheight2);
    Spring panheight = Spring.constant(panelheight);
    Spring panwidth = Spring.sum(panwidthr, Spring.minus(xvalue));
    Spring ypandisp = Spring.sum(yyvalue, Spring.minus(Spring.sum(xvalue,panheight)));
    Spring dxvalue = spring2.getConstraint(SpringLayout.WEST, dimension);
    Spring dyvalue = spring2.getConstraint(SpringLayout.NORTH, dimension);
    //text parameters
    Spring txx = Spring.constant(tx);
    Spring tyy = Spring.constant(ty);
    Spring twidth = Spring.constant(twid);
    Spring theight = Spring.constant(thei);
    //button parameters
    JButton up = new JButton();
    Spring b1x = Spring.sum(txx,twidth);
    Spring b1width = Spring.constant(bwid);
    Spring b1height = Spring.constant(bhei);
    Spring b1y = Spring.sum(tyy,b1height);
    Spring b2x = Spring.sum(b1x, Spring.sum(b1x,b1width));
    //text1 x position
    Spring t1xx = Spring.sum(b2x,Spring.minus(twidth));
    Spring t3x = Spring.sum(b2x, Spring.sum(txx,b1width));
    Spring b3x = Spring.sum(t3x,twidth);
    Spring t4x = Spring.sum(b3x,Spring.sum(txx,b1width));
    Spring b4x = Spring.sum(b3x,Spring.sum(b1x,b1width));
    Spring t5x = Spring.sum(b4x,Spring.sum(txx,b1width));
    Spring b5x = Spring.sum(b4x,Spring.sum(b1x,b1width));
    Spring t6x = Spring.sum(b5x,Spring.sum(txx,b1width));
    Spring b6x = Spring.sum(b5x,Spring.sum(b1x,b1width));
    Spring t7x = Spring.sum(b6x,Spring.sum(txx,b1width));
    Spring b7x = Spring.sum(b6x,Spring.sum(b1x,b1width));
    //Label parameters
    Spring lyy = Spring.constant(ly);
    //Adding features to panels
    TitledBorder dampdim = new TitledBorder("Damper Dimensions");
    dimension.setBorder(dampdim);
    dimension.setLayout(spring2);
    TitledBorder mafv = new TitledBorder("Minimum Active Fluid Volume");
    MAFV.setBorder(mafv);
    MAFV.setLayout(spring3);
    TitledBorder torq = new TitledBorder("Torque");
    Torque.setBorder(torq);
    Torque.setLayout(spring4);
    TitledBorder reluc = new TitledBorder("Reluctance");
    Reluctance.setBorder(reluc);
    Reluctance.setLayout(spring5);
    TitledBorder mfd = new TitledBorder("Magnetic Flux Density");
    MFD.setBorder(mfd);
    MFD.setLayout(spring6);
    TitledBorder ns = new TitledBorder("Normal Stress");
    NS.setBorder(ns);
    NS.setLayout(spring7);
    TitledBorder ss = new TitledBorder("Shear Stress");
    SS.setBorder(ss);
    SS.setLayout(spring8);
    TitledBorder magnet = new TitledBorder("Magnetic Properties");
    deck.setBorder(magnet);
    //Adding features to L up button---------------------------------------------------------
    up.setText("UP");
    up.setFont( new Font( "UP", Font.BOLD, 2));
    up.addActionListener(new T1C());
    //Component positioning-------------------------------------------------------------------
    c.add(dimension);
    spring.getConstraints(dimension).setX(xvalue);
    spring.getConstraints(dimension).setY(ypandisp);
    spring.getConstraints(dimension).setWidth(panwidth);
    spring.getConstraints(dimension).setHeight(panheight);
    //Minimum Active Fluid Volume calculator--------------------------------------------------
    c.add(MAFV);
    spring.getConstraints(MAFV).setX(xvalue);
    spring.getConstraints(MAFV).setY(xvalue);
    spring.getConstraints(MAFV).setWidth(panwidV);
    spring.getConstraints(MAFV).setHeight(panheight);
    MAFV.add(Vfield);
    spring3.getConstraints(Vfield).setX(xvalue);
    spring3.getConstraints(Vfield).setY(tyy);
    spring3.getConstraints(Vfield).setWidth(Spring.sum(twidth,twidth));
    spring3.getConstraints(Vfield).setHeight(theight);
    /*MAFV.add(buttons[14]);
    spring3.getConstraints(buttons[14]).setX(b1x);
    spring3.getConstraints(buttons[14]).setY(tyy);
    spring3.getConstraints(buttons[14]).setWidth(b1width);
    spring3.getConstraints(buttons[14]).setHeight(b1height);
    MAFV.add(buttons[15]);
    spring3.getConstraints(buttons[15]).setX(b1x);
    spring3.getConstraints(buttons[15]).setY(b1y);
    spring3.getConstraints(buttons[15]).setWidth(b1width);
    spring3.getConstraints(buttons[15]).setHeight(b1height);*/
    MAFV.add(kfield);
    spring3.getConstraints(kfield).setX(t1xx);
    spring3.getConstraints(kfield).setY(tyy);
    spring3.getConstraints(kfield).setWidth(twidth);
    spring3.getConstraints(kfield).setHeight(theight);
    MAFV.add(buttons[16]);
    spring3.getConstraints(buttons[16]).setX(b2x);
    spring3.getConstraints(buttons[16]).setY(tyy);
    spring3.getConstraints(buttons[16]).setWidth(b1width);
    spring3.getConstraints(buttons[16]).setHeight(b1height);
    MAFV.add(buttons[17]);
    spring3.getConstraints(buttons[17]).setX(b2x);
    spring3.getConstraints(buttons[17]).setY(b1y);
    spring3.getConstraints(buttons[17]).setWidth(b1width);
    spring3.getConstraints(buttons[17]).setHeight(b1height);
    MAFV.add(etafield);
    spring3.getConstraints(etafield).setX(t3x);
    spring3.getConstraints(etafield).setY(tyy);
    spring3.getConstraints(etafield).setWidth(twidth);
    spring3.getConstraints(etafield).setHeight(theight);
    MAFV.add(buttons[18]);
    spring3.getConstraints(buttons[18]).setX(b3x);
    spring3.getConstraints(buttons[18]).setY(tyy);
    spring3.getConstraints(buttons[18]).setWidth(b1width);
    spring3.getConstraints(buttons[18]).setHeight(b1height);
    MAFV.add(buttons[19]);
    spring3.getConstraints(buttons[19]).setX(b3x);
    spring3.getConstraints(buttons[19]).setY(b1y);
    spring3.getConstraints(buttons[19]).setWidth(b1width);
    spring3.getConstraints(buttons[19]).setHeight(b1height);
    MAFV.add(taofield);
    spring3.getConstraints(taofield).setX(t4x);
    spring3.getConstraints(taofield).setY(tyy);
    spring3.getConstraints(taofield).setWidth(twidth);
    spring3.getConstraints(taofield).setHeight(theight);
    MAFV.add(buttons[20]);
    spring3.getConstraints(buttons[20]).setX(b4x);
    spring3.getConstraints(buttons[20]).setY(tyy);
    spring3.getConstraints(buttons[20]).setWidth(b1width);
    spring3.getConstraints(buttons[20]).setHeight(b1height);
    MAFV.add(buttons[21]);
    spring3.getConstraints(buttons[21]).setX(b4x);
    spring3.getConstraints(buttons[21]).setY(b1y);
    spring3.getConstraints(buttons[21]).setWidth(b1width);
    spring3.getConstraints(buttons[21]).setHeight(b1height);
    MAFV.add(lamfield);
    spring3.getConstraints(lamfield).setX(t5x);
    spring3.getConstraints(lamfield).setY(tyy);
    spring3.getConstraints(lamfield).setWidth(twidth);
    spring3.getConstraints(lamfield).setHeight(theight);
    MAFV.add(buttons[22]);
    spring3.getConstraints(buttons[22]).setX(b5x);
    spring3.getConstraints(buttons[22]).setY(tyy);
    spring3.getConstraints(buttons[22]).setWidth(b1width);
    spring3.getConstraints(buttons[22]).setHeight(b1height);
    MAFV.add(buttons[23]);
    spring3.getConstraints(buttons[23]).setX(b5x);
    spring3.getConstraints(buttons[23]).setY(b1y);
    spring3.getConstraints(buttons[23]).setWidth(b1width);
    spring3.getConstraints(buttons[23]).setHeight(b1height);
    MAFV.add(wfield);
    spring3.getConstraints(wfield).setX(t6x);
    spring3.getConstraints(wfield).setY(tyy);
    spring3.getConstraints(wfield).setWidth(twidth);
    spring3.getConstraints(wfield).setHeight(theight);
    MAFV.add(buttons[24]);
    spring3.getConstraints(buttons[24]).setX(b6x);
    spring3.getConstraints(buttons[24]).setY(tyy);
    spring3.getConstraints(buttons[24]).setWidth(b1width);
    spring3.getConstraints(buttons[24]).setHeight(b1height);
    MAFV.add(buttons[25]);
    spring3.getConstraints(buttons[25]).setX(b6x);
    spring3.getConstraints(buttons[25]).setY(b1y);
    spring3.getConstraints(buttons[25]).setWidth(b1width);
    spring3.getConstraints(buttons[25]).setHeight(b1height);
    c.add(deck);
    spring.getConstraints(deck).setX(xvalue);
    spring.getConstraints(deck).setY(Spring.sum(Spring.sum(xvalue,panheight),Spring.sum(xvalue,panheight)));
    spring.getConstraints(deck).setWidth(panwidV);
    spring.getConstraints(deck).setHeight(panheight);
    //Reluctance calculator--------------------------------------------------------------------------------------------------
    Reluctance.add(Relfield);
    spring5.getConstraints(Relfield).setX(xvalue);
    spring5.getConstraints(Relfield).setY(xvalue);
    spring5.getConstraints(Relfield).setWidth(Spring.sum(twidth,panheight));
    spring5.getConstraints(Relfield).setHeight(theight);
    Reluctance.add(buttons[54]);
    spring5.getConstraints(buttons[54]).setX(b1x);
    spring5.getConstraints(buttons[54]).setY(tyy);
    spring5.getConstraints(buttons[54]).setWidth(b1width);
    spring5.getConstraints(buttons[54]).setHeight(b1height);
    Reluctance.add(buttons[55]);
    spring5.getConstraints(buttons[55]).setX(b1x);
    spring5.getConstraints(buttons[55]).setY(b1y);
    spring5.getConstraints(buttons[55]).setWidth(b1width);
    spring5.getConstraints(buttons[55]).setHeight(b1height);
    Reluctance.add(Lenfield);
    spring5.getConstraints(Lenfield).setX(t1xx);
    spring5.getConstraints(Lenfield).setY(tyy);
    spring5.getConstraints(Lenfield).setWidth(twidth);
    spring5.getConstraints(Lenfield).setHeight(theight);
    Reluctance.add(buttons[56]);
    spring5.getConstraints(buttons[56]).setX(b2x);
    spring5.getConstraints(buttons[56]).setY(tyy);
    spring5.getConstraints(buttons[56]).setWidth(b1width);
    spring5.getConstraints(buttons[56]).setHeight(b1height);
    Reluctance.add(buttons[57]);
    spring5.getConstraints(buttons[57]).setX(b2x);
    spring5.getConstraints(buttons[57]).setY(b1y);
    spring5.getConstraints(buttons[57]).setWidth(b1width);
    spring5.getConstraints(buttons[57]).setHeight(b1height);
    Reluctance.add(myufield);
    spring5.getConstraints(myufield).setX(t3x);
    spring5.getConstraints(myufield).setY(tyy);
    spring5.getConstraints(myufield).setWidth(twidth);
    spring5.getConstraints(myufield).setHeight(theight);
    Reluctance.add(buttons[58]);
    spring5.getConstraints(buttons[58]).setX(b3x);
    spring5.getConstraints(buttons[58]).setY(tyy);
    spring5.getConstraints(buttons[58]).setWidth(b1width);
    spring5.getConstraints(buttons[58]).setHeight(b1height);
    Reluctance.add(buttons[59]);
    spring5.getConstraints(buttons[59]).setX(b3x);
    spring5.getConstraints(buttons[59]).setY(b1y);
    spring5.getConstraints(buttons[59]).setWidth(b1width);
    spring5.getConstraints(buttons[59]).setHeight(b1height);
    Reluctance.add(Afield);
    spring5.getConstraints(Afield).setX(t4x);
    spring5.getConstraints(Afield).setY(tyy);
    spring5.getConstraints(Afield).setWidth(twidth);
    spring5.getConstraints(Afield).setHeight(theight);
    Reluctance.add(buttons[60]);
    spring5.getConstraints(buttons[60]).setX(b4x);
    spring5.getConstraints(buttons[60]).setY(tyy);
    spring5.getConstraints(buttons[60]).setWidth(b1width);
    spring5.getConstraints(buttons[60]).setHeight(b1height);
    Reluctance.add(buttons[61]);
    spring5.getConstraints(buttons[61]).setX(b4x);
    spring5.getConstraints(buttons[61]).setY(b1y);
    spring5.getConstraints(buttons[61]).setWidth(b1width);
    spring5.getConstraints(buttons[61]).setHeight(b1height);
    Reluctance.add(controls[1]);
    spring5.getConstraints(controls[1]).setX(t5x);
    spring5.getConstraints(controls[1]).setY(tyy);
    spring5.getConstraints(controls[1]).setWidth(twidth);
    spring5.getConstraints(controls[1]).setHeight(theight);
    MFD.add(controls[0]);
    spring5.getConstraints(controls[0]).setX(t5x);
    spring5.getConstraints(controls[0]).setY(tyy);
    spring5.getConstraints(controls[0]).setWidth(twidth);
    spring5.getConstraints(controls[0]).setHeight(theight);
    //Adding graphics to main container----------------------------------------------------------------------------------------
    c.add(mdp);
    spring.getConstraints(mdp).setX(panygr);
    spring.getConstraints(mdp).setY(xvalue);
    spring.getConstraints(mdp).setWidth(panygr);
    spring.getConstraints(mdp).setHeight(panheight2);
    dimension.add(LLfield);
    spring2.getConstraints(LLfield).setX(txx);
    spring2.getConstraints(LLfield).setY(tyy);
    spring2.getConstraints(LLfield).setWidth(twidth);
    spring2.getConstraints(LLfield).setHeight(theight);
    dimension.add(up);
    spring2.getConstraints(up).setX(b1x);
    spring2.getConstraints(up).setY(tyy);
    spring2.getConstraints(up).setWidth(b1width);
    spring2.getConstraints(up).setHeight(b1height);
    dimension.add(buttons[1]);
    spring2.getConstraints(buttons[1]).setX(b1x);
    spring2.getConstraints(buttons[1]).setY(b1y);
    spring2.getConstraints(buttons[1]).setWidth(b1width);
    spring2.getConstraints(buttons[1]).setHeight(b1height);
    dimension.add(RRfield);
    spring2.getConstraints(RRfield).setX(t1xx);
    spring2.getConstraints(RRfield).setY(tyy);
    spring2.getConstraints(RRfield).setWidth(twidth);
    spring2.getConstraints(RRfield).setHeight(theight);
    dimension.add(buttons[2]);
    spring2.getConstraints(buttons[2]).setX(b2x);
    spring2.getConstraints(buttons[2]).setY(tyy);
    spring2.getConstraints(buttons[2]).setWidth(b1width);
    spring2.getConstraints(buttons[2]).setHeight(b1height);
    dimension.add(buttons[3]);
    spring2.getConstraints(buttons[3]).setX(b2x);
    spring2.getConstraints(buttons[3]).setY(b1y);
    spring2.getConstraints(buttons[3]).setWidth(b1width);
    spring2.getConstraints(buttons[3]).setHeight(b1height);
    dimension.add(rrfield);
    spring2.getConstraints(rrfield).setX(t3x);
    spring2.getConstraints(rrfield).setY(tyy);
    spring2.getConstraints(rrfield).setWidth(twidth);
    spring2.getConstraints(rrfield).setHeight(theight);
    dimension.add(buttons[4]);
    spring2.getConstraints(buttons[4]).setX(b3x);
    spring2.getConstraints(buttons[4]).setY(tyy);
    spring2.getConstraints(buttons[4]).setWidth(b1width);
    spring2.getConstraints(buttons[4]).setHeight(b1height);
    dimension.add(buttons[5]);
    spring2.getConstraints(buttons[5]).setX(b3x);
    spring2.getConstraints(buttons[5]).setY(b1y);
    spring2.getConstraints(buttons[5]).setWidth(b1width);
    spring2.getConstraints(buttons[5]).setHeight(b1height);
    dimension.add(llfield);
    spring2.getConstraints(llfield).setX(t4x);
    spring2.getConstraints(llfield).setY(tyy);
    spring2.getConstraints(llfield).setWidth(twidth);
    spring2.getConstraints(llfield).setHeight(theight);
    dimension.add(buttons[6]);
    spring2.getConstraints(buttons[6]).setX(b4x);
    spring2.getConstraints(buttons[6]).setY(tyy);
    spring2.getConstraints(buttons[6]).setWidth(b1width);
    spring2.getConstraints(buttons[6]).setHeight(b1height);
    dimension.add(buttons[7]);
    spring2.getConstraints(buttons[7]).setX(b4x);
    spring2.getConstraints(buttons[7]).setY(b1y);
    spring2.getConstraints(buttons[7]).setWidth(b1width);
    spring2.getConstraints(buttons[7]).setHeight(b1height);
    dimension.add(ttfield);
    spring2.getConstraints(ttfield).setX(t5x);
    spring2.getConstraints(ttfield).setY(tyy);
    spring2.getConstraints(ttfield).setWidth(twidth);
    spring2.getConstraints(ttfield).setHeight(theight);
    dimension.add(buttons[8]);
    spring2.getConstraints(buttons[8]).setX(b5x);
    spring2.getConstraints(buttons[8]).setY(tyy);
    spring2.getConstraints(buttons[8]).setWidth(b1width);
    spring2.getConstraints(buttons[8]).setHeight(b1height);
    dimension.add(buttons[9]);
    spring2.getConstraints(buttons[9]).setX(b5x);
    spring2.getConstraints(buttons[9]).setY(b1y);
    spring2.getConstraints(buttons[9]).setWidth(b1width);
    spring2.getConstraints(buttons[9]).setHeight(b1height);
    dimension.add(HHfield);
    spring2.getConstraints(HHfield).setX(t6x);
    spring2.getConstraints(HHfield).setY(tyy);
    spring2.getConstraints(HHfield).setWidth(twidth);
    spring2.getConstraints(HHfield).setHeight(theight);
    dimension.add(buttons[10]);
    spring2.getConstraints(buttons[10]).setX(b6x);
    spring2.getConstraints(buttons[10]).setY(tyy);
    spring2.getConstraints(buttons[10]).setWidth(b1width);
    spring2.getConstraints(buttons[10]).setHeight(b1height);
    dimension.add(buttons[11]);
    spring2.getConstraints(buttons[11]).setX(b6x);
    spring2.getConstraints(buttons[11]).setY(b1y);
    spring2.getConstraints(buttons[11]).setWidth(b1width);
    spring2.getConstraints(buttons[11]).setHei

    headdesk
    Post a short (< 1 page) example program that forum members can copy and run,
    that demonstrates your problem.

  • Create a login page using when button is pressed trigger

    I need to write a code that allows users to enter their name and password and there organisation type. If the organisation type entered is staff they are takeing to the appropriate block if it is courts they are taken to another block. This is what I am stuck on. If anyone could help I would be extremley grateful.
    declare
    staff_id varchar2(4);
    user_password varchar2(8);
    org varchar2(10);
    alert_button number;
    begin
    select employee_no,n_password,organisation_type
    into staff_id, user_password,org
    from organisation
    where :login.text_item_user_name=organisation.employee_no and :login.text_item_type= organisation.organisation_type;
    if(staff_id =:login.text_item_user_name AND user_password =:login.text_item_password)
    then go_block('Driving_Test');
    else
    else
    alert_button := show_alert ('Alert_Incorrect_Login');
    if alert_button= alert_button1 then
    clear_block;
    end if;
    end if;
    end if;
    end;

    OK. So does the code work? Are you getting a compilation error? Please be more descriptive. Also, it is helpful if you use the tags round your code so it will be formatted and easier to read. :)  Check out the <a href="http://forums.oracle.com/forums/help.jspa">FAQ </a>link for a list of other useful formatting tags.
    Craig...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • When I try to open a second page in safari I press the " +" button but it automatically closes out of safari.. Wht should I do?

    When I try to open a second page in safari I press the " +" button but it automatically closes out of safari.. What should I do?- thanks

    Try clearing Safari's cache : Settings > Safari > Clear Cookies And Data and also Clear History
    If that doesn't fix it then try closing Safari via the taskbar and see if it works when you re-open it :
    iOS 7 :double-click the home button to open the taskbar, and then swipe or drag the Safari app's screen from there up and off the top of the screen to close it, and click the home button to close the taskbar.
    iOS 6 and below : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option if the above doesn't fix it is a soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Open an Application... using When-Button-Pressed Trigger

    Hi,
    when ever i pressed the button in forms 6i, i want to open an application
    like notepad, excel, word......
    Ex:- if we open the run program through start button ,
    type notepad and press ok..
    it will open the notepad window.
    Thanks.

    In C/S deployment of Forms 6i you can use the HOST. refer to the online help for more detail.
    HOST built-in executes Operating System commands, so use the command you want.
    Tony

  • How can I open the windows file directory in "WHEN-BUTTON-PRESSED" trigger

    Dear All,
    How can I open the windows file directory in “WHEN-BUTTON-PRESSED” trigger?

    Blessan Joseph,
    The solution is dependent on your Forms version and if your applications is traditional Client/Server (CS) (Forms 6i and lower) or web deployed (Forms 6i and higher). For CS, you would use the Get_File_Name() built-in as Faa demonstrated. For Web, you will need to use the WebUtil library function Client_Get_File_Name() as Sarah (OGIR) demonstrated. Both of these functions will return the full path to a file. Note: WebUtil is an external library so it requires you to perform some configuration on your developer client as well as on the Application Server. WebUtil is included with Forms 9i and higher, but you must download it for Forms 6i.
    My requirement is user should able to select windows directory for the output.Do you really need to allow the user to write to a file in the Windows directory? This is very dangerous and you should not allow users or programs to write to the Windows directory. Users should only be able to write files to "User" directories (\My Documents\<Directory name>).
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How to change cursor when need to open a new dialog?

    Hi,
    I try to change cursor to WAIT when client open a new dialog, which it tell user the program was running to ready display new dialog.
    My code was like the following
    scene.setCursor(Cursor.WAIT);
    someclass.showMyDialog(); // The dialog was a new stage with StageStyle.UTILITY style
    scene.setCursor(Cursor.DEFAULT);
    But the cursor didn't be changed, I didn't know it why? Anybody know it? thank in advance!
    I had search the google, and didn't find the perfect answer, most of they was like to use setCursor(Cursor.WAIT) mode.
    the current ENV in my host was: windows 7 and Java
    java version "1.7.0_13"
    Java(TM) SE Runtime Environment (build 1.7.0_13-b20)
    Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)
    Best regards,
    Edited by: user13005878 on May 27, 2013 1:48 AM

    If you have a long running process ("long" means anything the user will notice), you need to run it in a thread other than the JavaFX Application Thread. In other words, you need to change the cursor to the wait cursor on the FX Application Thread, launch a user-defined thread for your long running process (connecting to the database), and once that thread is complete, show the dialog and change the cursor back on the FX Application Thread again. If you try to do everything on the FX Application Thread, you'll likely block that thread and prevent any changes from being visible to the user until the long process is complete (so you'll never see the wait cursor).
    All that said, and as jsmith said, there are some bugs in JavaFX 2.2 with the appearance of the cursor. So on my system (Mac OS X 10.7.5) the "correct" behavior is only observed with JavaFX 8.
    This is an example of doing things wrong. Here I don't see any change to the cursor, even on JavaFX 8:
    import javafx.application.Application;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Cursor;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    public class WaitCursorDemo extends Application {
      @Override
      public void start(Stage primaryStage) {
        final BorderPane root = new BorderPane();
        final Scene scene = new Scene(root, 600, 400);
        Button button = new Button("Do something time-consuming");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            System.out.println("Starting...");
            scene.setCursor(Cursor.WAIT);
            try {
              Thread.sleep(2000);
            } catch (InterruptedException exc) {
              exc.printStackTrace();
            scene.setCursor(Cursor.DEFAULT);
            System.out.println("Done");
        root.setBottom(button);
        primaryStage.setScene(scene);
        primaryStage.show();
      public static void main(String[] args) {
        launch(args);
    }This works on JavaFX 8: after pressing the button I see the wait cursor for two seconds, then it reverts to the default cursor.
    import javafx.application.Application;
    import javafx.concurrent.Task;
    import javafx.concurrent.WorkerStateEvent;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Cursor;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.layout.BorderPane;
    import javafx.stage.Stage;
    public class WaitCursorDemo extends Application {
      @Override
      public void start(Stage primaryStage) {
        final BorderPane root = new BorderPane();
        final Scene scene = new Scene(root, 600, 400);
        Button button = new Button("Do something time-consuming");
        button.setOnAction(new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            System.out.println("Starting...");
            scene.setCursor(Cursor.WAIT);
            Task<Void> task = new Task<Void>() {
              @Override
              protected Void call() throws Exception {
                try {
                  Thread.sleep(2000);
                } catch (InterruptedException exc) {
                  exc.printStackTrace();
                return null;
            task.setOnSucceeded(new EventHandler<WorkerStateEvent>() {
              @Override
              public void handle(WorkerStateEvent event) {
                scene.setCursor(Cursor.DEFAULT);
                System.out.println("Done");
                // Display your dialog now you have the data from the database...
            new Thread(task).start();
        root.setBottom(button);
        primaryStage.setScene(scene);
        primaryStage.show();
      public static void main(String[] args) {
        launch(args);
    }

Maybe you are looking for