TextField not showing

Whenever I try to add a TextField to my application, it does not show on the GUI. Is this a bug, or am I missing something?
Thanks
Edited by: 877391 on Oct 16, 2011 1:35 PM

Start with launching Ensemble app from http://javafx.com/about-javafx/. Check Contol demos and then click on "Source" tab to see the code.
If it still does not work then please post the code of your sample application here.

Similar Messages

  • INPUT textfield does not show non-English letters with transparent mode

    INPUT textfield does not show non-English letters when i
    type, if transparent mode turn on
    this is bug of Flash Player 9?
    will this bug had be fixed?

    I just tested Firefox and Chrome on linux, i doesn't work either, but i get different weird chars: éèça
    However, on both mac and linux, if i copy the chars and paste them in the input field, it passes.

  • Small u-tilde not showing in textField

    Hi all,
    I have a problem with the u-tilde not showing in a textfield.
    I need to display all sorts of chars with different accents,
    and they
    all show, except for u-tilde.
    I suppose it is not a widely used char since it isn't even
    listed in
    HTML latin 1 entity lists (like:
    http://w3schools.com/tags/ref_entities.asp)
    but, well, some people need
    it...
    Test below show it's really an oddball since all other chars
    with a
    tilde show.
    Weird thing is: removing the TextFormat (or just the line
    with
    embedfonts) all together shows all three instances of the
    u-tilde.
    Anyone have a clue as to how to get it to show?
    (actual used code is with loading an UTF-8 encoded XML file.
    No show
    either.)
    thanks in advance,
    Manno
    AS2 code as example
    fontsymbol with linkageID "my_palentino" is in library
    var tf:TextFormat = new TextFormat();
    tf.font = "my_palentino";
    tf.size = 28;
    var t:TextField = this.createTextField( "test_txt", 1, 0, 0,
    500, 100 );
    t.embedFonts = true;
    t.html = true;
    t.htmlText = "<p>abc - &#361;Å© -
    &#227;&#241; - \u0169</p>";
    t.setTextFormat( tf );
    Manno Bult
    http://www.aloft.nl

    Hi all,
    Not to bumb the thread (well maybe...) but could anybody say
    something
    conclusive about the following:
    * Is it true that fontsymbols do only include basic latin as
    stated
    here:
    http://tekkie.flashbit.net/flash/embedding-fonts-in-flash-cs3
    * Is it true the u-tilde char is not a part of basic latin?
    (i think I
    can guess this...)
    It seems a solution to my problem is:
    - creating a textfield for each style (bold, italic etc.) to
    use
    - embed fonts through the properties panel for each field
    - use css to do text formatting
    It requires 'some' changes to the file though :(
    thanks in advance,
    Manno
    Manno Bult wrote:
    >
    > Hi all,
    >
    > I have a problem with the u-tilde not showing in a
    textfield.
    >
    > I need to display all sorts of chars with different
    accents, and they
    > all show, except for u-tilde.
    >
    > I suppose it is not a widely used char since it isn't
    even listed in
    > HTML latin 1 entity lists (like:
    >
    http://w3schools.com/tags/ref_entities.asp)
    but, well, some people need
    > it...
    >
    > Test below show it's really an oddball since all other
    chars with a
    > tilde show.
    > Weird thing is: removing the TextFormat (or just the
    line with
    > embedfonts) all together shows all three instances of
    the u-tilde.
    >
    > Anyone have a clue as to how to get it to show?
    >
    > (actual used code is with loading an UTF-8 encoded XML
    file. No show
    > either.)
    >
    > thanks in advance,
    > Manno
    >
    > /*
    > AS2 code as example
    > fontsymbol with linkageID "my_palentino" is in library
    > */
    > var tf:TextFormat = new TextFormat();
    > tf.font = "my_palentino";
    > tf.size = 28;
    >
    > var t:TextField = this.createTextField( "test_txt", 1,
    0, 0, 500, 100 );
    > t.embedFonts = true;
    > t.html = true;
    > t.htmlText = "<p>abc - &#361;Å© -
    &#227;&#241; - \u0169</p>";
    > t.setTextFormat( tf );
    >
    >
    Manno Bult
    http://www.aloft.nl

  • Separator is not showing up in the JList that is set in the TextField

    Hi,
    This problem is really weird and I am tired trying to find the problem and so thought i ll ask u guys... i cant see any problem in the code below.. but when i run it the separator that i want if some condition is true it just dsnt come... i did debug it and it does actually go in the if condition but the separator is not showing up... i dont kno y...
    I am pasting the code of the JList renderer SearchListCellRenderer that implements ListCellRenderer.......it has only one method....
    public Component getListCellRendererComponent(JList list, Object value,
                   int     index, boolean isSelected, boolean cellHasFocus) {
              JLabel label = null;
              if (value != null){
                   label = new JLabel();/*(JLabel) defaultRenderer.getListCellRendererComponent(list, value, index,
                   isSelected, cellHasFocus);*/
                   if(!anatomySeparator && anatomyMap.containsKey(value.toString().toLowerCase())){
                        label.setVerticalTextPosition(SwingConstants.BOTTOM);
                        label.setPreferredSize(new Dimension(300, 80));
                        label.setText("<html><body>" + "<p style='color:white;'><b>--------------Anatomy--------------</b></p>" + "<p style='color:white;'><b>" + value.toString() + "</b></p></body></html>");
                        anatomySeparator = true;
                        logger.debug("in anatomy");
                   }else if(!diseaseSeparator && diseaseMap.containsKey(value.toString().toLowerCase())){
                        label.setVerticalTextPosition(SwingConstants.BOTTOM);
                        label.setPreferredSize(new Dimension(300, 80));
                        label.setText("<html><body>" + "<p style='color:white;'><b>---------------Diseases----------------</b></p>" + "<p style='color:white;'><b>" + value.toString() + "</b></p></body></html>");
                        diseaseSeparator = true;
                        logger.debug("in disease");
                   }else if(!propSeparator && observationMap.containsKey(value.toString().toLowerCase())){
                        label.setVerticalTextPosition(SwingConstants.BOTTOM);
                        label.setPreferredSize(new Dimension(300, 80));
                        label.setText("<html><body>" + "<p style='color:white;'><b>-----------Observations----------------</b></p>" + "<p style='color:white;'><b>" + value.toString() + "</b></p></body></html>");
                        propSeparator = true;
                        logger.debug("in observation");
                   }else{
                        label.setPreferredSize(new Dimension(300, 30));
                        label.setText("<html><body><p style='color:white;'><b>" + value.toString() + "</b></p></body></html>");
              return label;
    If i see the output the list in the JList is bold also in the condition i have the label size larger so in some values the label is actually large than others... that means it does go in the if condition... but the separator that i have there it just dsnt show up... i dnt kno wat is wrong... can anyone pls help me with this????
    This is how i set the autocopleter text field with the Jlist and its renderer... if that is of some help.....
    JList list = new JList();
    JPopupMenu popup = new JPopupMenu();
    JTextComponent textComp;
    private static final String AUTOCOMPLETER = "AUTOCOMPLETER"; //NOI18N
    public SearchListCellRenderer renderer;
    public AutoCompleter(JTextComponent comp){
    textComp = comp;
    textComp.putClientProperty(AUTOCOMPLETER, this);
    JScrollPane scroll = new JScrollPane(list);
    scroll.setBorder(null);
    list.setFocusable( false );
    list.setBackground(Color.DARK_GRAY);
    list.setForeground(Color.WHITE);
    renderer = new SearchListCellRenderer();
    list.setCellRenderer(renderer);
    scroll.getVerticalScrollBar().setFocusable( false );
    scroll.getHorizontalScrollBar().setFocusable( false );
    popup.setBorder(BorderFactory.createLineBorder(Color.black));
    popup.add(scroll);
    if(textComp instanceof JTextField){
    textComp.registerKeyboardAction(showAction, KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0), JComponent.WHEN_FOCUSED);
    textComp.getDocument().addDocumentListener(documentListener);
    }else
    textComp.registerKeyboardAction(showAction, KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyEvent.CTRL_MASK), JComponent.WHEN_FOCUSED);
    textComp.registerKeyboardAction(upAction, KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0), JComponent.WHEN_FOCUSED);
    textComp.registerKeyboardAction(hidePopupAction, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_FOCUSED);
    popup.addPopupMenuListener(new PopupMenuListener(){
    public void popupMenuWillBecomeVisible(PopupMenuEvent e){
    public void popupMenuWillBecomeInvisible(PopupMenuEvent e){
    textComp.unregisterKeyboardAction(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));
    public void popupMenuCanceled(PopupMenuEvent e){
    list.setRequestFocusEnabled(false);
    }

    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.

  • Image is not showing up on Dialog.

    Hi Guys
    I am getting problem with Dialog. In my Dialog I have created the image field which accepts image from dam by Drag and drop. Whil Iam dropping the image it is showing up inside the Dialog properly and is showing up on the screen also But when I try to edit the image the current image got vanished inside the dialog. I don't understand why it is happening?
    while uploading
    The above image is not showing up while editing. Could you please help me where I am doing wrong?
    here is my dialog.xml
    <normalmode
    jcr:primaryType="cq:Widget"
    collapsed="{Boolean}false"
    collapsible="{Boolean}false"
    hidden="{Boolean}false"
    title="Picture Properties"
    xtype="dialogfieldset">
    <items jcr:primaryType="cq:WidgetCollection">
    <pictureurl
    jcr:primaryType="cq:Widget"
    allowUpload="{Boolean}true"
    autoUploadDelay="1"
    ddGroups="[media]"
    fieldLabel="Picture Link"
    fileNameParameter="./fileName"
    fileReferenceParameter="./fileReference"
    height="{Long}200"
    name="./file"
    requestSuffix="/image.img.png"
    rootpath="/etc/designs/aib/business/images"
    sizeLimit="100"
    uploadUrl="/tmp/upload_test/*"
    xtype="html5smartimage"/>
    <picturealttext
    jcr:primaryType="cq:Widget"
    fieldLabel="Picture Alt Text"
    name="./picturealttext"
    xtype="textfield"/>
    <picturetitletext
    jcr:primaryType="cq:Widget"
    fieldLabel="Picture Title Text"
    name="./picturetitletext"
    xtype="textfield"/>
    </items>
    </normalmode>
    Cheers
    Kirthi

    Hi Jitendra,
    It worked.Perfect. Thank you very much. I want to implement the same in my Custom widget which contains smartimage. But it is not showing up. Here is my Custom widget code for the smartfile but iam not getting Drag and drop jus it is showing up blank. Any idea how can I incorporate the smartfile in my Custom widget.
    // Picture URL
                            this.add(new CQ.Ext.form.Label( {
                                cls : "customwidget-label",
                                text : ""
                            this.bannerImageURL = new CQ.form.SmartFile( {
                                cls : "customwidget-1",
                                fieldLabel : "Picture Link: ",
                                editable:false,
                                allowBlank : false,
                                anchor: '75%',
                                maxLength : 100,
                                cropParameter :"./image/imageCrop",
                                ddGroups : "media",
                                fileNameParameter : "./image/fileName",
                                fileReferenceParameter : "./image/fileReference",
                                mapParameter :"./image/imageMap",
                                rotateParameter : "./image/imageRotate",
                                name : "./image/file",
                                requestSuffix : "/image.img.png",
                                sizeLimit : "100",
                                autoUploadDelay : "1",
                                listeners : {
                                    change : {
                                        scope : this,
                                        fn : this.updateHidden
                                    dialogclose : {
                                        scope : this,
                                        fn : this.updateHidden
                            this.add(this.bannerImageURL);
    Once again thanks for helping me to resolve the issue. The above is another requirement. Any ideas?
    Cheers
    Kirthi

  • "TM" special character not showing up! Help!

    I have all the copy loaded in Flash (it works OK) from the
    database in ASP, but Im not showing the "™" in Flash from
    database. I have embedded ™ in the dynamic textfield and it
    didnt work. Is it the ASP I need to make it work?
    Thanks!

    Magnix wrote:
    > So I just embed %99 in Flash?
    Instead of typing in your source file the "TM" you need to
    replace it with
    URL encoding %99
    For example, I want to write this and make sure flash reads
    it correctly:
    "bang & olufse"
    In the ASP file I will write it as follow, to assure it's
    correctly displayed
    in Flash"
    %22bang %26 olufse%22
    Best Regards
    Urami
    "Never play Leap-Frog with a Unicorn."
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • LOV on Parameter form  can not show in IE

    In report builder I build two user parameter by Parameter Form builder.
    one is the search_mouth in which we type the month, the other is department_name
    which is selected by a drop down list and we can not type the name only select a name from the list.
    Everything is ok when I run it in report environment, but when I call it in browser the search_mouth field is ok, but the department_name change to a common textfield not a drop down list ,and all department_name is shown below the textfield.
    command line is http://10.20.8.102:8888/reports/rwservlet?destype=cache&desformat=PDF&report=myrep&userid=scott/tiger@paramform=yes
    I do not know how to show the dynamic list in browser.

    Hello,
    In Reports Builder :
    http://www.oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwwhthow/howto/params/pmp_creating_list_of_values.htm
    If you run the report from a Web browser and the list of values is unrestricted, the HTML Parameter Form will display a text field instead of a combo box, and a list of static values that you can copy and paste into the text field. In this case, the first column will always be shown in the Parameter Form, even if Hide First Column is selected.
    Regards

  • Xml menu not showing in published html

    Hi all my problem is that when iam trying to publish an flash
    project containing a dynamic xml menu as html file ,the menu is not
    showing although it is showing in the accompannying swf file,any
    body knows the problem??

    There is not enough here to know what you are doing.
    Flash reads XML fine. You can then use that XML inside of
    Flash to create menus (or any UI thing) using Flash objects such as
    MovieClips and TextFields.
    You will not be able to create HTML based menus as Flash does
    not handle more than a few HTML tags via the TextField object.

  • Gui labels and buttons not showing...

    I am using Java to create a gui and so far I have everything working.
    But there is a section of code thats not working out and Ill post the whole file here (not very big) to let you guys see whats going on. The issue lies in the action listner where I state "if a text feild is empty, display the option pane, else show the following" and its not showing the labels and buttons.
    Help?
    package student.information.search;
    import javax.swing.JFrame;
    import java.awt.GridBagLayout;
    import javax.swing.WindowConstants;
    import java.awt.Rectangle;
    import javax.swing.JLabel;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import java.awt.ActiveEvent;
    import java.awt.Frame;
    import java.awt.GridBagConstraints;
    import java.awt.Insets;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JTextField;
    import javax.swing.JButton;
    import student.information.readonly.ReadOnlyStudentForm;
    public class StudentSearch extends Frame implements ActionListener
       JTextField textField = new JTextField();
       JFrame frame = new JFrame();
       JPanel contentPane = (JPanel) frame.getContentPane();
       GridBagLayout gridBagLayout = new GridBagLayout();
        public StudentSearch()
            gridBagLayout.columnWidths = new int[]{20, 0, 12, 137, 17};
            gridBagLayout.rowHeights = new int[]{26, 0, 6, 0, 20};
            gridBagLayout.columnWeights = new double[]{1, 0, 0, 0, 0};
            gridBagLayout.rowWeights = new double[]{0, 0, 0, 0, 1};
            contentPane.setLayout(gridBagLayout);
            JButton button = new JButton();
            button.setText("Search");
            button.addActionListener(this);
            contentPane.add(button, new GridBagConstraints(3, 3, 1, 1, 0.0, 0.0, 13, 0, new Insets(0, 0, 0, 0), 0, 0));
            textField.setColumns(8);
            contentPane.add(textField, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0, 768, 2, new Insets(0, 0, 0, 0), 0, 0));
            JLabel label = new JLabel();
            label.setText("Student Seach");
            contentPane.add(label, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0, 256, 0, new Insets(0, 0, 0, 0), 0, 0));
            frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
            frame.setTitle("Student Search");
            frame.setBounds(new Rectangle(500, 0, 500, 320));
            frame.setVisible(true);
       public void actionPerformed( ActionEvent arg0)
            if (textField.getText().equals(""))
              JOptionPane.showConfirmDialog(null, "Please enter a value in the search feild", "Error", JOptionPane.OK_CANCEL_OPTION); 
            else
               //Show the text fields here and the user information. 
                 *  While there are students for this search, change the text fields to Name, Last Name and ID and have a button called
                 *  View that when clicked allows for you to view all that students information.
                JLabel firstName = new JLabel();
                firstName.setText("Label");
                contentPane.add(firstName, new GridBagConstraints(5, 5, 1, 1, 0.0, 0.0, 768, 0, new Insets(0, 0, 0, 0), 0, 0));
                JLabel lastName = new JLabel();
                lastName.setText("Label");
                contentPane.add(lastName, new GridBagConstraints(3, 5, 1, 1, 0.0, 0.0, 256, 0, new Insets(0, 0, 0, 0), 0, 0));
                JLabel studentID = new JLabel();
                studentID.setText("Label");
                contentPane.add(studentID, new GridBagConstraints(1, 5, 1, 1, 0.0, 0.0, 256, 0, new Insets(0, 0, 0, 0), 0, 0));
                JButton viewStudentInformation = new JButton();
                viewStudentInformation.setText("Search");
                viewStudentInformation.addActionListener(new ActionListener()
                        public void actionPerformed(ActionEvent e)
                               //For viewing individual student information
                                new ReadOnlyStudentForm();
                contentPane.add(viewStudentInformation, new GridBagConstraints(7, 3, 1, 1, 0.0, 0.0, 13, 0, new Insets(0, 0, 0, 0), 0, 0));
    }

    In general when adding or removing components for a visible GUI you need to use:
    panel.add(...);
    panel.revalidate();
    panel.repaint();

  • Paramform dynamic list can not show in browser

    In report builder I build two user parameter by Parameter Form builder.
    one is the search_mouth in which we type the month, the other is department_name
    which is selected by dynamic list and we can not type the name only select a name from the list.
    Everything is ok when I run it in report environment, but when I call it in browser the search_mouth field is ok, but the department_name change to a common textfield not a dynamic list,and all department_name is shown below the textfield.
    command line is http://10.20.8.102:8888/reports/rwservlet?destype=cache&desformat=PDF&report=myrep&userid=scott/tiger@a&paramform=yes
    I do not know how to show the dynamic list in browser.

    I just tried and it works for me. The LOV value of the parameter is shown in browser as pulldown list.
    I created a group above reports based on select * from emp where deptno = :p_deptno.
    user parameter p_deptno is defined as sql select unique deptno from emp. In the parameter form builder, I selected desformat and p_deptno to show in the parameter form. When I run it through rwservlet, I get a text edit box for desformat, and pulldown list for deptno.
    Thanks,
    -Shaun

  • Why the Image dose not show?

    the program can run, however, the image just dose not show on the container, I've mad ....
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    import javax.imageio.*;
    import java.io.*;
    public class gui extends JFrame{
    private stack s=new stack();
    private queue q1=new queue();
    private queue q2=new queue();
    private JRadioButton rbutton1,rbutton2,rbutton3,rbutton4,rbutton5;
    private JTextArea point1,point2,infoarea;
    private JButton ok ,exit;
    int state=0;
    private JLabel b=new JLabel(new ImageIcon("abc.jpg"));
    public gui() {    
    creatUserInterface();
    private void creatUserInterface(){
    Container contentPane=getContentPane();
    contentPane.setLayout(null);
    b.setBounds(0, 0,127,127);
    contentPane.add(b);
    rbutton1=new JRadioButton();
    rbutton1.setBounds(45, 270, 20,20);
    rbutton1.setBackground(Color.decode("170800"));
    contentPane.add(rbutton1);
    rbutton2=new JRadioButton();
    rbutton2.setBounds(145, 270, 20,20);
    rbutton2.setBackground(Color.decode("170800"));
    contentPane.add(rbutton2);
    rbutton3=new JRadioButton();
    rbutton3.setBounds(245, 270, 20,20);
    rbutton3.setBackground(Color.decode("170800"));
    contentPane.add(rbutton3);
    rbutton4=new JRadioButton();
    rbutton4.setBounds(345, 270, 20,20);
    rbutton4.setBackground(Color.decode("170800"));
    contentPane.add(rbutton4);
    rbutton5=new JRadioButton();
    rbutton5.setBounds(445, 270, 20,20);
    rbutton5.setBackground(Color.decode("170800"));
    contentPane.add(rbutton5);
    point1=new JTextArea();
    point1.setBounds(585, 20, 43, 20);
    contentPane.add(point1);
    point2=new JTextArea();
    point2.setBounds(585, 205, 43, 20);
    contentPane.add(point2);
    infoarea=new JTextArea();
    infoarea.setBounds(30, 300, 450, 100);
    infoarea.setText("click \"ok \" to start game, click \"exit \" to exit");
    contentPane.add(infoarea);
    ok=new JButton();
    ok.setBounds(520, 255, 75, 60);
    ok.setText("OK");
    contentPane.add(ok);
    ok.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent event){          
    okButton(event);
    exit=new JButton();
    exit.setBounds(520, 340, 75, 65);
    exit.setText("EXIT");
    contentPane.add(exit);
    exit.addActionListener(
    new ActionListener(){
    public void actionPerformed(ActionEvent event){          
    exitButton(event);
    contentPane.setBackground(Color.decode("170800"));
    setTitle("Change it or Not");
    setSize(640, 480);
    setVisible(true);
    Message was edited by:
    explosivealan

    because the code is very long and i just cut the code i think is not related, i post all the code here, should i post the code of stack , queue and others class?My objective is to show all cardLabel as jpg, abc is to test only.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.image.*;
    import java.awt.geom.*;
    import javax.imageio.*;
    import java.io.*;
    public class gui extends JFrame{
        private stack s=new stack();                                      // a stack with 52 node to store 52 cards
        private queue q1=new queue();                                     // a queue to hold the computer player's cards
        private queue q2=new queue();                                     // a queue to hold the human player's cards
        private cardoperation op=new cardoperation();                    // contain all card operation that require to run the game       
        private handcompare hc=new handcompare();                        // pass two queue to handcompare, if the first queue defealt the second queue, return true, otherwise reture false
        private JLabel cardlabel1,cardlabel2,cardlabel3,cardlabel4,cardlabel5,cardlabel6,cardlabel7,cardlabel8,cardlabel9,cardlabel10;     // label to show the cards
        private JLabel computerpoint,playerpoint,inputbet,dollarsign;        
        private JRadioButton rbutton1,rbutton2,rbutton3,rbutton4,rbutton5;   //radio button for selecting which card to be changed
        private JTextField bet;                                               //Textfield to input the amount of bet
        private JTextArea point1,point2,infoarea;                             //textarea to show player's point and futher infomation;
        private JButton ok ,exit;                                             //button to confirm or to exit game
        int compoint=10000,playpoint=10000;                                    // integer to store the player's current point;'
        int betamount;                                                         // integer to store the current bet amount
        int state=0;                                                           // store the state of the program
        private JLabel b=new JLabel(new ImageIcon("abc.jpg"));
        public gui() {    
            super();
            creatUserInterface();
        private void creatUserInterface(){
        Container contentPane=getContentPane();   
        contentPane.setLayout(null);
        cardlabel1=new JLabel();
        cardlabel1.setBounds(50, 15, 50, 30);
        cardlabel1.setText("");
        contentPane.add(cardlabel1);
        b.setBounds(0, 0,127,127);
        contentPane.add(b);
        cardlabel2=new JLabel();
        cardlabel2.setBounds(150, 15, 50, 30);
        cardlabel2.setText("");
        contentPane.add(cardlabel2);
        cardlabel3=new JLabel();
        cardlabel3.setBounds(250, 15, 50, 30);
        cardlabel3.setText("");
        contentPane.add(cardlabel3);
        cardlabel4=new JLabel();
        cardlabel4.setBounds(350, 15, 50, 30);
        cardlabel4.setText("");
        contentPane.add(cardlabel4);
        cardlabel5=new JLabel();
        cardlabel5.setBounds(450, 15, 50, 30);
        cardlabel5.setText("");
        contentPane.add(cardlabel5);
        cardlabel6=new JLabel();
        cardlabel6.setBounds(50, 200, 50, 30);
        cardlabel6.setText("");
        contentPane.add(cardlabel6);
        cardlabel7=new JLabel();
        cardlabel7.setBounds(150, 200, 50, 30);
        cardlabel7.setText("");
        contentPane.add(cardlabel7);
        cardlabel8=new JLabel();
        cardlabel8.setBounds(250, 200, 50, 30);
        cardlabel8.setText("");
        contentPane.add(cardlabel8);
        cardlabel9=new JLabel();
        cardlabel9.setBounds(350, 200, 50, 30);
        cardlabel9.setText("");
        contentPane.add(cardlabel9);
        cardlabel10=new JLabel();
        cardlabel10.setBounds(450, 200, 50, 30);
        cardlabel10.setText("");
        contentPane.add(cardlabel10);
        rbutton1=new JRadioButton();
        rbutton1.setBounds(45, 270, 20,20);
        rbutton1.setBackground(Color.decode("170800"));
        contentPane.add(rbutton1);
        rbutton2=new JRadioButton();
        rbutton2.setBounds(145, 270, 20,20);
        rbutton2.setBackground(Color.decode("170800"));
        contentPane.add(rbutton2);
        rbutton3=new JRadioButton();
        rbutton3.setBounds(245, 270, 20,20);
        rbutton3.setBackground(Color.decode("170800"));
        contentPane.add(rbutton3);
        rbutton4=new JRadioButton();
        rbutton4.setBounds(345, 270, 20,20);
        rbutton4.setBackground(Color.decode("170800"));
        contentPane.add(rbutton4);
        rbutton5=new JRadioButton();
        rbutton5.setBounds(445, 270, 20,20);
        rbutton5.setBackground(Color.decode("170800"));
        contentPane.add(rbutton5);
        computerpoint=new JLabel();
        computerpoint.setBounds(500, 15, 80, 30);
        computerpoint.setText("computer has");
        contentPane.add(computerpoint);
        playerpoint=new JLabel();
        playerpoint.setBounds(500, 200, 80, 30);
        playerpoint.setText("you have");
        contentPane.add(playerpoint);
        inputbet=new JLabel();
        inputbet.setBounds(500, 90, 130, 20);
        inputbet.setText("please input bet here");
        contentPane.add(inputbet);   
        dollarsign=new JLabel();
        dollarsign.setBounds(510, 115, 20, 20);
        dollarsign.setText("$");
        contentPane.add(dollarsign);   
        point1=new JTextArea();
        point1.setBounds(585, 20, 43, 20);   
        contentPane.add(point1);  
        point2=new JTextArea();
        point2.setBounds(585, 205, 43, 20);
        contentPane.add(point2);  
        infoarea=new JTextArea();
        infoarea.setBounds(30, 300, 450, 100);
        infoarea.setText("click \"ok \" to start game, click \"exit \" to exit");
        contentPane.add(infoarea);
        bet=new JTextField();
        bet.setBounds(530, 115, 60, 20);
        contentPane.add(bet);  
        ok=new JButton();
        ok.setBounds(520, 255, 75, 60);
        ok.setText("OK");
        contentPane.add(ok);
        ok.addActionListener(
                    new ActionListener(){
               public void actionPerformed(ActionEvent event){          
                 okButton(event);
        exit=new JButton();
        exit.setBounds(520, 340, 75, 65);
        exit.setText("EXIT");
        contentPane.add(exit);
        exit.addActionListener(
                    new ActionListener(){
               public void actionPerformed(ActionEvent event){          
                 exitButton(event);
        contentPane.setBackground(Color.decode("170800"));
        setTitle("Change it or Not");
        setSize(640, 480);
        setVisible(true);
        private void displayLabel(){
            int a[]=new int[5];
            int b[]=new int[5];
            String a1[]=new String[5];
            String b1[]=new String[5];
            a=q1.copy_queue();
            b=q2.copy_queue();
            int i;
                for(i=0;i<5;i++){
            if(a%100==13) a1[i]="A";
    else if(a[i]%100>0&&a[i]%100<10)a1[i]=String.valueOf(a[i]%100+1);
    else if(a[i]%100==10)a1[i]="J";
    else if(a[i]%100==11)a1[i]="Q";
    else if(a[i]%100==12)a1[i]="K";
    for(i=0;i<5;i++){
    if(b[i]%100==13) b1[i]="A";
    else if(b[i]%100>0&&b[i]%100<10)b1[i]=String.valueOf(b[i]%100+1);
    else if(b[i]%100==10)b1[i]="J";
    else if(b[i]%100==11)b1[i]="Q";
    else if(b[i]%100==12)b1[i]="K";
    cardlabel1.setText(a1[0]);
    if(a[0]/100==4)
    cardlabel1.setForeground(Color.PINK);
    else if(a[0]/100==3)
    cardlabel1.setForeground(Color.BLUE);
    else if(a[0]/100==2)
    cardlabel1.setForeground(Color.RED);
    else if(a[0]/100==1)
    cardlabel1.setForeground(Color.BLACK);
    cardlabel2.setText(a1[1]);
    if(a[1]/100==4)
    cardlabel2.setForeground(Color.PINK);
    else if(a[1]/100==3)
    cardlabel2.setForeground(Color.BLUE);
    else if(a[1]/100==2)
    cardlabel2.setForeground(Color.RED);
    else if(a[1]/100==1)
    cardlabel2.setForeground(Color.BLACK);
    cardlabel3.setText(a1[2]);
    if(a[2]/100==4)
    cardlabel3.setForeground(Color.PINK);
    else if(a[2]/100==3)
    cardlabel3.setForeground(Color.BLUE);
    else if(a[2]/100==2)
    cardlabel3.setForeground(Color.RED);
    else if(a[2]/100==1)
    cardlabel3.setForeground(Color.BLACK);
    cardlabel4.setText(a1[3]);
    if(a[3]/100==4)
    cardlabel4.setForeground(Color.PINK);
    else if(a[3]/100==3)
    cardlabel4.setForeground(Color.BLUE);
    else if(a[3]/100==2)
    cardlabel4.setForeground(Color.RED);
    else if(a[3]/100==1)
    cardlabel4.setForeground(Color.BLACK);
    cardlabel5.setText(a1[4]);
    if(a[4]/100==4)
    cardlabel5.setForeground(Color.PINK);
    else if(a[4]/100==3)
    cardlabel5.setForeground(Color.BLUE);
    else if(a[4]/100==2)
    cardlabel5.setForeground(Color.RED);
    else if(a[4]/100==1)
    cardlabel5.setForeground(Color.BLACK);
    cardlabel6.setText(b1[0]);
    if(b[0]/100==4)
    cardlabel6.setForeground(Color.PINK);
    else if(b[0]/100==3)
    cardlabel6.setForeground(Color.BLUE);
    else if(b[0]/100==2)
    cardlabel6.setForeground(Color.RED);
    else if(b[0]/100==1)
    cardlabel6.setForeground(Color.BLACK);
    cardlabel7.setText(b1[1]);
    if(b[1]/100==4)
    cardlabel7.setForeground(Color.PINK);
    else if(b[1]/100==3)
    cardlabel7.setForeground(Color.BLUE);
    else if(b[1]/100==2)
    cardlabel7.setForeground(Color.RED);
    else if(b[1]/100==1)
    cardlabel7.setForeground(Color.BLACK);
    cardlabel8.setText(b1[2]);
    if(b[2]/100==4)
    cardlabel8.setForeground(Color.PINK);
    else if(b[2]/100==3)
    cardlabel8.setForeground(Color.BLUE);
    else if(b[2]/100==2)
    cardlabel8.setForeground(Color.RED);
    else if(b[2]/100==1)
    cardlabel8.setForeground(Color.BLACK);
    cardlabel9.setText(b1[3]);
    if(b[3]/100==4)
    cardlabel9.setForeground(Color.PINK);
    else if(b[3]/100==3)
    cardlabel9.setForeground(Color.BLUE);
    else if(b[3]/100==2)
    cardlabel9.setForeground(Color.RED);
    else if(b[3]/100==1)
    cardlabel9.setForeground(Color.BLACK);
    cardlabel10.setText(b1[4]);
    if(b[4]/100==4)
    cardlabel10.setForeground(Color.PINK);
    else if(b[4]/100==3)
    cardlabel10.setForeground(Color.BLUE);
    else if(b[4]/100==2)
    cardlabel10.setForeground(Color.RED);
    else if(b[4]/100==1)
    cardlabel10.setForeground(Color.BLACK);
    point1.setText("$"+String.valueOf(compoint)); //show the value back if player has change it accdentially
    point2.setText("$"+String.valueOf(playpoint));
    if(betamount==0)
    bet.setText("");
    else
    bet.setText(String.valueOf(betamount));
    private void displayHalf(){
    int b[]=new int[5];
    String b1[]=new String[5];
    b=q2.copy_queue();
    int i;
    for(i=0;i<5;i++){
    if(b[i]%100==13) b1[i]="A";
    else if(b[i]%100>0&&b[i]%100<10)b1[i]=String.valueOf(b[i]%100+1);
    else if(b[i]%100==10)b1[i]="J";
    else if(b[i]%100==11)b1[i]="Q";
    else if(b[i]%100==12)b1[i]="K";
    cardlabel6.setText(b1[0]);
    if(b[0]/100==4)
    cardlabel6.setForeground(Color.PINK);
    else if(b[0]/100==3)
    cardlabel6.setForeground(Color.BLUE);
    else if(b[0]/100==2)
    cardlabel6.setForeground(Color.RED);
    else if(b[0]/100==1)
    cardlabel6.setForeground(Color.BLACK);
    cardlabel7.setText(b1[1]);
    if(b[1]/100==4)
    cardlabel7.setForeground(Color.PINK);
    else if(b[1]/100==3)
    cardlabel7.setForeground(Color.BLUE);
    else if(b[1]/100==2)
    cardlabel7.setForeground(Color.RED);
    else if(b[1]/100==1)
    cardlabel7.setForeground(Color.BLACK);
    cardlabel8.setText(b1[2]);
    if(b[2]/100==4)
    cardlabel8.setForeground(Color.PINK);
    else if(b[2]/100==3)
    cardlabel8.setForeground(Color.BLUE);
    else if(b[2]/100==2)
    cardlabel8.setForeground(Color.RED);
    else if(b[2]/100==1)
    cardlabel8.setForeground(Color.BLACK);
    cardlabel9.setText(b1[3]);
    if(b[3]/100==4)
    cardlabel9.setForeground(Color.PINK);
    else if(b[3]/100==3)
    cardlabel9.setForeground(Color.BLUE);
    else if(b[3]/100==2)
    cardlabel9.setForeground(Color.RED);
    else if(b[3]/100==1)
    cardlabel9.setForeground(Color.BLACK);
    cardlabel10.setText(b1[4]);
    if(b[4]/100==4)
    cardlabel10.setForeground(Color.PINK);
    else if(b[4]/100==3)
    cardlabel10.setForeground(Color.BLUE);
    else if(b[4]/100==2)
    cardlabel10.setForeground(Color.RED);
    else if(b[4]/100==1)
    cardlabel10.setForeground(Color.BLACK);
    cardlabel1.setText("");
    cardlabel2.setText("");
    cardlabel3.setText("");
    cardlabel4.setText("");
    cardlabel5.setText("");
    point1.setText("$"+String.valueOf(compoint)); //show the value back if player has change it accdentially
    point2.setText("$"+String.valueOf(playpoint));
    if(betamount==0)
    bet.setText("");
    else
    bet.setText(String.valueOf(betamount));
    private void okButton(ActionEvent event){
    switch(state){
    case(0):{
    op.reshuffle(s);
    op.CardDistribe(s, q1, q2);
    displayHalf();
    infoarea.setText("please input your bet and click \"ok \" \n\nSpace is Black Heart is Red \nClub is Bleu Diamond is Pink");
    break;
    case(1):{  
    try{
    betamount=Integer.parseInt(bet.getText());
    catch(NumberFormatException e){
    infoarea.setText("invaild input, please try again");
    state=state-1;
    if(state==1)
    if(betamount<=0||betamount>playpoint)
    {infoarea.setText("please input between 1 & "+String.valueOf(playpoint));
                           state=state-1;}
    else
    {infoarea.setText("please choose the cards to be changed \n\nSpace is Black    Heart is Red \nClub is Bleu         Diamond is Pink"); 
                           displayLabel();}
    break;
    case(2):{           
    infoarea.setText("choosed card has been changed");
    int a[]=new int[5];
    for(int i=0;i<5;i++)
    a[i]=0;
    if(rbutton1.isSelected())
    a[0]=1;
    if(rbutton2.isSelected())
    a[1]=1;
    if(rbutton3.isSelected())
    a[2]=1;
    if(rbutton4.isSelected())
    a[3]=1;
    if(rbutton5.isSelected())
    a[4]=1;
    op.computerChangeCard(s, q1, hc);
    op.playerChangeCard(s, q2, a);
    displayLabel();
    break;
    case(3):{          
    if(hc.compare(q1, q2)){
    infoarea.setText("you loss\n\nclick \"ok \" to continue");
    playpoint=playpoint-betamount;
    compoint=compoint+betamount;
    else{
    infoarea.setText("you win\n\nclick \"ok \" to continue");
    playpoint=playpoint+betamount;
    compoint=compoint-betamount;
    betamount=0;
    displayLabel();
    if(playpoint<=0)
    infoarea.setText("you have loss the game, press \"ok \" or \"exit \" to end game");
    else if(compoint<=0)
    infoarea.setText("you have win the game, press \"ok \" or \"exit \" to end game");
    else{
    state=-1;
    break;
    case(4):{
    exit(); // player's point <=0, so force to exit'
    default:
    rbutton1.setSelected(false);
    rbutton2.setSelected(false);
    rbutton3.setSelected(false);
    rbutton4.setSelected(false);
    rbutton5.setSelected(false);
    state=state+1;
    private void exitButton(ActionEvent event){
    exit();
    private void exit(){
    System.exit(0);

  • ITunes does not show up on apple tv 1st gen.

    i have a 1st gen apple tv with the 160 gig HD. recently, it will not show the itunes site. Under teh movies tab there are my movies and trailers and that's it. Does anyone know how to get the itunes store back on apple tv?

    Known issue currently, you'll need to wait for the fix.

  • My downloaded text sounds do not show up under the sounds tab in settings after installing 8.1.1. can someone help me please?

    i downloaded a couple text tones and since installing 8.1.1, they will not show up under the sounds tab. in fact, they do not show up in my recent purchases on itunes, but when i go to buy them again, it says that i have already bought this tone. I just want to use the tones i paid for as the tones on my phone. not asking much.... thanks for the help. i hope someone can help me get the tones working. thank you.

    This was happening to me too but only for some of my songs. I have a mac so I dunno about PCs, but for most of my ringtones I had to create an ACC version in itunes to make them short enough then turn that into a m4r and those all worked fine. But if the song was already short enough and I didn't create an ACC version and just turned the original into a m4r, then it wouldn't appear in my itunes.
    so if you're on a mac:
    1. go to get info, options, pick when you want the song to start and end.
         Has to be pretty short to work, 30 second or less is good
         if it's already short enough that's fine
    2. right click and click 'create ACC version'
         a copy with the length you put in will appear, drag that into a folder or whatever and just type in m4r where m4a would be
         still make an ACC version even if it's the right length
    Hopefully this helps someone else.

  • Internet Streams in Playlists do not show up on Apple TV

    I use the following setup:
    - Apple TV MD199LL/A (Software 6.0.1) just updated to the latest
    - iTunes 11.1.3 for Windows (from a Windows 7 x64)
    - iTunes 11.1.3 for MAC (from a Apple MacBook Pro x64, Maverix)
    Homesharing is turned on both computers
    From both machines I share pictures, videos and music.
    All photos, videos and music files are getting displayed  on the Apple TV menu, and can be played.
    All iTunes playlists from both machines are  getting displazed on the Apple TV
    BUT!
    If a internet stream is added to a playlist, this entry does not show on the Apple TV menu.
    If the playlist contains only internet streams the Apple TV menu says "There are no songs in this library"
    If I hit the play key on my remote, it  will randomly play the first stream in the playlist (not realy reproducable pattern)
    I can play those streams in iTunes and send it via AirPlay without problems,
    Can anyone help me with this and tell me what I'm doing wrong?
    Thank you

    You can only view that rental on the iPad. For it to show up it has to be rented directly on ATV or through a computer and streamed via home sharing

  • When I sync my iPod to my MacBook through iTunes new events do not show up and old events are not deleted. I am using Snow Leopard  and not iSync.

    I am using Snow Leopard on a MacBook. I have an iPod touch 3G. I do not use iSync it Mobile Me. When I sync my iPod through iTunes new events on my iPod do not show up on my Mac and old events do not delete. I have read help instructions that include deleting the data on the iPod. The iPod has the correct data and the Mac does not so I have not followed those instructions. I need help as the only reason I bought the Mac was to be able to sync, back up, view and print my calendar. Currently it is useless. If only Apple could have learned from the elegance of the Palm software.

    Start here:
    iPhone, iPad, or iPod touch: Device not recognized in iTunes for Windows

Maybe you are looking for

  • Error in starting the service Oracle CSService not found

    Hi all, i am trying to install Oracle Enterprise manager grid control, i am getting the following error message "error in starting the service Oracle CSService not found" when i checked in the "services.msc" the Oracle CSService is not started, so i

  • Oaf: putting validation in VO based on sql query

    Hi All, I need few inputs for the customization of OAF page. Business Need: Restriction of special character in supplier oaf pages for supplier name. There are 3 oaf pages involved in supplier creation/update for R 12.1.3 1)     oracle\apps\pos\suppl

  • Equipment master outbound IDoc

    Hi Team, We have to transfer Equipment master data from SAP to PI (outbound from R/3) Please help me with the IDoc type, message type and the trigger to generate the outbound IDoc. This is urgent, please hellp. Thanks, Pratibha

  • How to use HOST call DOS continuous running problem but NOT hold Forms scre

    In my Forms, I have a Button a start a MP3 recorder program to record voice, I use HOST command to init the program successfully. However, since the MP3 recorder program in continuous running, the HOST command hold my Forms screen until the MP3 progr

  • How to validation of textbox in Core Java(Desktop Application)?

    I am developing billing software in Core Java (Desktop Application). I want to know how to do validation of null values of textbox. and validation of other components in Core Java (Same as we use javascript in JSP, what do we use in Core Java?)