Why the empty form is showing?

Friends,
OAS - 10gR2 in RHEL AS 4.8
Client PC - winxp sp2
I have set the userid in the formsweb.cfg like below for my configuration part.
userid=username/password@db
why this "userid=username/password@db" in formsweb.cfg is not working in oracle application server? i restared everything...but still its not working...when i open the form in the browser nothing is coming..at the same time if i remove userid part in the formsweb.cfg...the form is working but its asking for username and password...i gave the same username and password where i mentioned in the formsweb.cfg then its working....what might be the reason?
thanks

I am not specifically familiar with Windows, but in Linux, the OS will swap unused pages even if the memory is not completely full. This is just a normal part of what the OS does, so even on a system that uses very little memory you will always see some swap activity.
The idea behind this behavior is that you don't want to wait with the swaps to a time when the system is very loaded and the swapping will have to compete for CPU.

Similar Messages

  • Why the iPhone dose not show the witting in case if the other person have a call and I'm on witting?

    Why the iPhone dose not show the witting in case if the other person have a call and I'm on witting? really I'm dissappointed with this point Why we do not have this service?

    That is not a feature of the iPhone (or of any phone I've ever had so apparently it's far from universal). Apple has not said why they have no such feature.
    You can request such a feature here:
    http://www.apple.com/feedback
    Either the person you're calling will answer you or they won't. What difference does it make why?

  • Do anyone know why the desktops do not show? Is this a bug?

    Do anyone know why the desktops do not show?

    See:
    * http://kb.mozillazine.org/Images_or_animations_do_not_load
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Why the Itune is not showing my iphone in it???

    I m using Iphone 5s and i want to copy songs and some other stuff from my pc to my iphone. I searched for it on google and read some discussion on the official site of APPLE, acc. to them i need Itune to do so. I downloaded it from the apple site but when i connect my Iphone to my pc then The Itune  does not show my IPhone anywhere... plz help

    Hey nrathi,
    Thanks for using Apple Support Communities.
    Follow this article since the iPhone does not appear under Devices in iTunes.
    iOS: Device not recognized in iTunes for Windows
    http://support.apple.com/kb/ts1538
    Have a nice day,
    Mario

  • Why the Image is not showing on Report at runtime?

    Post Author: azharrahi
    CA Forum: .NET
    I am working on a web site which was developed in ASP.Net 1.1. This web site also contains Crystal Reports version 9.
    Now I have loaded the web site in Visual Studio.net 2005 and hence in ASP.Net 2.0. Still the Crystal reports version is 9.
    Everything is ok and Crystal reports are showing data properly.
    But one thing is very strange and annoyable.i.e. When I insert image on Crystal Reports through right click-> Insert->Picture, the image is shown in the design time preview of report, but when I load the Crystal Report on .Net control CrystalReportViewer and run the application, the Image is not displayed. The problem becomes more strange when I Export the Crystal Report to PDF file and MS Excel. Strangely the Image is also exported there and is displayed. Whats the problem? Why Image is not displayed on the CrystalreportViewer of the form on run time and why on exporting to PDF file and MS Excel, it is displayed? Can any body tell me whats the problem behind of not displaying image on runtime?
    At least it means that Image is embeded and loaded on runtime. Only now viewing. Only a blank Picture box displayed.

    Post Author: Argan
    CA Forum: .NET
    A couple things can cause this.
    Right click on the red x to find out the name of the png file.  Search the web server for that png and make sure that the asp worker has access to it.
    The other is a image handler issue.  Search the kbase for Red X NET 2005 and you will find a kbase or two that addresses this.

  • Why the oval is not showing up?

    heres my code:
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    public class myApplet extends java.applet.Applet {
    boolean initialization = true;
    int centerX, centerY, maxX, maxY;
    float pixelSize, rWidth = 400.0F, rHeight = 400.0F;
    BufferedImage gBuffer;
    void initializeGraphics()
    Dimension d = canvas1.getSize();
    maxX = d.width - 1; maxY = d.height - 1;
    pixelSize = Math.max((rWidth)/maxX, (rHeight)/maxY);
    centerX = maxX/2; centerY = maxY/2;
    int iX(float x){return Math.round(centerX + x/pixelSize);}
    int iY(float y){return Math.round(centerY - y/pixelSize);}
    float fx(int x){return ((x - centerX) * pixelSize);}
    float fy(int y){return ((centerY - y) * pixelSize);}
    void clearGraphics(Graphics g) {
    g.setColor(Color.WHITE);
    g.fillRect(0,0, maxX, maxY);
    /** Initializes the applet Trans2D */
    public void init() {
    try {
    java.awt.EventQueue.invokeAndWait(new Runnable() {
    public void run() {
    initComponents();
    } catch (Exception ex) {
    ex.printStackTrace();
    this.setSize(700, 700);
    gBuffer = new BufferedImage((int)rWidth, (int)rHeight, BufferedImage.TYPE_INT_ARGB);
    /** This method is called from within the init() method to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    canvas1 = new mycanvas();
    jScrollBarPoints = new javax.swing.JScrollBar();
    jLabelNoPoints = new javax.swing.JLabel();
    canvas1.addMouseListener(new java.awt.event.MouseAdapter() {
    public void mousePressed(java.awt.event.MouseEvent evt) {
    canvas1MousePressed(evt);
    jScrollBarPoints.setMaximum(25);
    jScrollBarPoints.setMinimum(3);
    jScrollBarPoints.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
    jScrollBarPoints.addAdjustmentListener(new java.awt.event.AdjustmentListener() {
    public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {
    jScrollBarPointsAdjustmentValueChanged(evt);
    jLabelNoPoints.setText("3");
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .addContainerGap()
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
    .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollBarPoints, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
    .add(org.jdesktop.layout.GroupLayout.LEADING, canvas1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
    .add(18, 18, 18)
    .add(jLabelNoPoints, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .add(296, 296, 296))
    layout.setVerticalGroup(
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(layout.createSequentialGroup()
    .addContainerGap()
    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    .add(jLabelNoPoints)
    .add(layout.createSequentialGroup()
    .add(jScrollBarPoints, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
    .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
    .add(canvas1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 452, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
    .add(20, 20, 20))
    }// </editor-fold>
    private void canvas1MousePressed(java.awt.event.MouseEvent evt) {                                    
    // TODO add your handling code here:
    Graphics g = gBuffer.getGraphics();
    g.drawOval(evt.getX(), evt.getY(), 10, 10);
    g.fillOval(evt.getX(), evt.getY(), 10, 10);
    private void jScrollBarPointsAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {                                                       
    jLabelNoPoints.setText(""+jScrollBarPoints.getValue());
    // Variables declaration - do not modify
    private java.awt.Canvas canvas1;
    private javax.swing.JLabel jLabelNoPoints;
    private javax.swing.JScrollBar jScrollBarPoints;
    // End of variables declaration
    public class mycanvas extends java.awt.Canvas {
    public void paint(Graphics g){
    super.paint(g);
    my question is.when i press with the mouse on canvas1 why it doesnt draw an oval in that X,Y ? How can I solve that? Thanks!

    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    public class myApplet extends java.applet.Applet {
    boolean initialization = true; 
    int centerX, centerY, maxX, maxY;
    float pixelSize, rWidth = 400.0F, rHeight = 400.0F;
    BufferedImage gBuffer;
    void initializeGraphics()
       Dimension d = canvas1.getSize();
       maxX = d.width - 1; maxY = d.height - 1;
       pixelSize = Math.max((rWidth)/maxX, (rHeight)/maxY);
       centerX = maxX/2; centerY = maxY/2;
      int iX(float x){return Math.round(centerX + x/pixelSize);}
      int iY(float y){return Math.round(centerY - y/pixelSize);}
      float fx(int x){return ((x - centerX) * pixelSize);}
      float fy(int y){return ((centerY - y) * pixelSize);}
    void clearGraphics(Graphics g) {
        g.setColor(Color.WHITE);
        g.fillRect(0,0, maxX, maxY);
        /** Initializes the applet Trans2D */
        public void init() {
            try {
                java.awt.EventQueue.invokeAndWait(new Runnable() {
                    public void run() {
                        initComponents();
            } catch (Exception ex) {
                ex.printStackTrace();
            this.setSize(700, 700);
            gBuffer = new BufferedImage((int)rWidth, (int)rHeight, BufferedImage.TYPE_INT_ARGB);
        /** This method is called from within the init() method to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
        private void initComponents() {
            canvas1 = new mycanvas();
            jScrollBarPoints = new javax.swing.JScrollBar();
            jLabelNoPoints = new javax.swing.JLabel();
            canvas1.addMouseListener(new java.awt.event.MouseAdapter() {
                public void mousePressed(java.awt.event.MouseEvent evt) {
                    canvas1MousePressed(evt);
            jScrollBarPoints.setMaximum(25);
            jScrollBarPoints.setMinimum(3);
            jScrollBarPoints.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
            jScrollBarPoints.addAdjustmentListener(new java.awt.event.AdjustmentListener() {
                public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {
                    jScrollBarPointsAdjustmentValueChanged(evt);
            jLabelNoPoints.setText("3");
            org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);
            this.setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jScrollBarPoints, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, canvas1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE))
                    .add(18, 18, 18)
                    .add(jLabelNoPoints, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(296, 296, 296))
            layout.setVerticalGroup(
                layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                .add(layout.createSequentialGroup()
                    .addContainerGap()
                    .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                        .add(jLabelNoPoints)
                        .add(layout.createSequentialGroup()
                            .add(jScrollBarPoints, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                            .add(canvas1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 452, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                    .add(20, 20, 20))
        }// </editor-fold>                       
        private void canvas1MousePressed(java.awt.event.MouseEvent evt) {                                    
            Graphics g = gBuffer.getGraphics ();
            g.setColor (Color.RED);
            g.fillOval (evt.getX (), evt.getY (), 10, 10);
            g.setColor (Color.BLUE);
            g.drawOval (evt.getX(), evt.getY(), 10, 10);
        private void jScrollBarPointsAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt) {                                                       
            jLabelNoPoints.setText(""+jScrollBarPoints.getValue());
        // Variables declaration - do not modify                    
        private java.awt.Canvas canvas1;
        private javax.swing.JLabel jLabelNoPoints;
        private javax.swing.JScrollBar jScrollBarPoints;
        // End of variables declaration                  
        public class mycanvas extends java.awt.Canvas {
            public void paint(Graphics g){
                super.paint (g);
                g.drawImage (gBuffer, 0, 0, null);
    }still nothing? is it so difficult to do such an easy thing?

  • Why the scatter graph doesnt show data?

    Hi,
    I would like to ask something..i use the latest version of bean with size 1.74 MB and i download it from the oracle site but SCATTER GRAPH didn't work with it.. it doesn't show anything from the data that have been sent to it..
    I saw in the sample code that comes with the bean (graph90 file) that the scatter type is new supported one..so does this version of bean support the scatter graph in oracle 10g forms? if yes what do you think that the problem might be ?
    Does anyone know what the problem might be and how i can fix it?
    Thanks alot
    Eyad Basheer

    Grant SELECT or DEBUG on scott.emp to trainee3, or else give trainee3 some global SELECT ANY privilege.

  • Why the graphics doesn't show on screen?

    I wrote the code using AWT to draw an Arc2D to window after received input numbers but it draws nothing to screen. I tried to debug and found nothing. Can someone help me on this?
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    public class PieChart extends JFrame implements ActionListener
    private JPanel inputP;
    private DrawPanel drawP;
    private JLabel instruct, prompt1, prompt2, prompt3, prompt4; //all prompt labels
    private JTextField num1, num2, num3, num4; //input text field
    int value1, value2, value3, value4, total;
    //Graphics2D g2d;
    public PieChart()
    super( "Drawing 2D PieChart" );
    Container c = getContentPane();
    c.setLayout(new FlowLayout());
         inputP = new JPanel();
    inputP.setLayout(new GridLayout(4,2));
                                                                                    //initial text prompts
    instruct = new JLabel("Enter the number at each prompt and press enter");
         prompt1 = new JLabel("First Number:");
    prompt2 = new JLabel("Second Number:");
         prompt3 = new JLabel("Third Number:");
    prompt4 = new JLabel("Fourth Number:");
                                                                                    //initial input fields
    num1 = new JTextField(5);
         num1.addActionListener(this);
         num2 = new JTextField(5);
         num2.addActionListener(this);
         num3 = new JTextField(5);
         num3.addActionListener(this);
         num4 = new JTextField(5);
         num4.addActionListener(this);
         inputP.add(prompt1);
         inputP.add(num1);
         inputP.add(prompt2);
         inputP.add(num2);
         inputP.add(prompt3);
         inputP.add(num3);
         inputP.add(prompt4);
         inputP.add(num4);
         c.add(inputP, BorderLayout.NORTH);
    drawP = new DrawPanel(350,180);
    drawP.add(instruct);
    c.add(drawP, BorderLayout.CENTER);
    setSize( 350, 560 );
    show();
    public void actionPerformed(ActionEvent e)
              String getInput;
              if(e.getSource() == num1)
                   getInput = num1.getText();
                   value1 = Integer.parseInt(getInput);
    num2.grabFocus();
              if(e.getSource() == num2)
                   getInput = num2.getText();
                   value2 = Integer.parseInt(getInput);
    num3.grabFocus();
              if(e.getSource() == num3)
                   getInput = num3.getText();
                   value3 = Integer.parseInt(getInput);
                   num4.grabFocus();
              if(e.getSource() == num4)
                   getInput = num4.getText();
                   value4 = Integer.parseInt(getInput);
                   drawP.setPie(value1, value2, value3,value4);
    The main function will generate the new PieChart object and Overridden so we can exit when window is closed.*********************/
    public static void main( String args[] )
    PieChart app = new PieChart();
    app.addWindowListener(
    new WindowAdapter() {
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    }//endmain
    class DrawPanel extends JPanel {
    //private int currentChoice = -1; // don't draw first time
    private int width = 100, height = 100;
    private int vl1, vl2, vl3, vl4, total ;
    Graphics2D g2d;
    public DrawPanel( int w, int h )
    width = ( w >= 0 ? w : 100 );
    height = ( h >= 0 ? h : 100 );
    public void paintComponent( Graphics g )
    super.paintComponent( g );
    // create 2D by casting g to Graphics2D
    g2d = ( Graphics2D ) g;
    if(total == 0 )
    g2d.setPaint(Color.black);
    g2d.setStroke(new BasicStroke(1.0f));
    g2d.draw(new Arc2D.Double(250,90,80,100,0,360,Arc2D.PIE));
    System.out.print("Done drawing a cirle");
    }else // draw 2D pie-shaped arc in white
    g2d.setPaint( Color.cyan );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,0,(vl1*360/total),Arc2D.PIE));
    g2d.setPaint( Color.blue );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl1*360/total),(vl2*360/total),Arc2D.PIE));
    g2d.setPaint( Color.green );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl2*360/total),(vl3*360/total),Arc2D.PIE));
    g2d.setPaint( Color.red );
    g2d.setStroke( new BasicStroke( 2.0f ) );
    g2d.fill(new Arc2D.Double(120,90,80,100,(vl3*360/total),(vl4*360/total),Arc2D.PIE));
    System.out.print("End of drawing ");
    public void setPie( int v1, int v2, int v3, int v4 )
    total = 0;
    vl1 = v1;
    vl2 = v2;
    vl3 = v3;
    vl4 = v4;
    total = v1 + v2 + v3 + v4;
    System.out.print(v1+ " "+ v2+" "+v3+" "+v4+ " Total value: " + total);
    repaint();
    }

    The first thing I see is the you have declared 'total' in DrawPanel. As it is never set there, you are testing a variable which is always zero.

  • Why the FCP 7 is show the different clip view which is not there?

    I am using FCP7 for about 5 years now but never faced this type problem before. I am using footage from 3 different cameras as usual. When I view the clip or export the files it shows the different clips which are not there. Could anyone help me to solve the issue please. I already trashed the FCP preferences.
    Thanks in advance.

    This sometime occurs when you are using source that is not friendly to FCP-7, such as material that is in the H.264 or other mpg format.
    Is your source material all converted to an edit friendly format?
    MtD

  • Does anyone know why the text preview still shows in notification center when show preview is turned off in settings

    I have my text message preview turned off for notification center but text preview still shows anyone know a way to fix this problem

    Have you tried a reset. This will not affect your data, it is just like rebooting your computer. Hold the sleep/wake and home buttons together until you see the Apple logo and then release. After the phone restarts, see if that will help.

  • Why the Safari web inspector shows it takes 16229 days to load some resources?

    As chrome shows everything right, safari always show some resources take 16229.0 days to download, and the resource is actually downloaded in a few ms.
    It happens to every sites(I guess) and every resources randomly.
    All extension is disabled and I just reset safari, but nothing changes.

    Safari also takes a long time(more than 10s) to load a page sometimes while Chrome just load it instantly. I think this happens when it shows to take 16229 days to load resources

  • Why the subvi can not show,when i use call by reference node.

    I used a call by reference node in function pallete,i follow the labview manuals and examples(dynamic load example), but i can not see the subvi show when the program running.
    Attachments:
    comshow.vi ‏75 KB
    交流稳态频谱.vi ‏19 KB

    Hi Sunny,
    Open your subVI,
    1. go to File->Vi Properties (or Ctrl+I)
    2. choose Window Appearance category
    3. choose Customize
    4. check "Show Front Panel When Called" (and "Close Afterwards ..")
    5. save the VI, close it and try again.
    Let us know if it's OK ...

  • 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);

  • Can you look at my code and give me any idea why the pie garph doesnt show?

    Hi..
    i use beans to create an pie graph and i dont know how i can add data to it,i mean what data must be pass to it.. as u know in column and line graph there is an x-axis and y-axis and in pie there no x or y axis..i need 2 categories and one value to put on it.
    and the code is :
    CURSOR C_DETAIL IS
    SELECT REF_TYPE ,
    REF_YEAR ,
    REF_NUM ,
    ACT_DATE ,
    UNREL_PROF_LOSS , ----------------->(value)
    TO_CHAR(ACT_DATE , 'DD/ MM/ YYYY') ,----------->(Category1)
    LPAD(TO_CHAR(REF_TYPE),2,'0')||'/'||
    LPAD(TO_CHAR(REF_YEAR),2,'0')||'/'||
    LPAD(TO_CHAR(REF_NUM),6,'0') "DEAL_NUM"--------->(Category2)
    FROM BOND_ACT
    WHERE ISSUE_NUM = :KEY.ISSUE_NUM AND
    ISSUE_NUM_ABB = :KEY.ISSUE_NUM_ABB AND
    ISSUER_ID = TO_NUMBER(:KEY.ISSUER_ID ) AND
    ACT_DATE >= TO_DATE(:KEY.FROM_DATE,'J') AND
    ACT_DATE <= TO_DATE(:KEY.TO_DATE,'J') AND
    ACT_TYPE = 6
    ORDER BY REF_TYPE , REF_YEAR , REF_NUM , ACT_DATE;
    BEGIN
    set_custom_property('CHART_DISP.SIMPLEGRAPH',1,'CLEAR_GRAPH','');
    SET_CUSTOM_PROPERTY('CHART_DISP.SIMPLEGRAPH',1,'DEBUG','TRUE');
    VD := ',';
    COUNTER := 0;
    OPEN C_DETAIL;
    FETCH C_DETAIL INTO var1,var2,var3,var4,value,Category1,Category2;
    while (C_DETAIL%FOUND) LOOP
    CDATA := X||VD||'PIE GRAPH'||VD||X;                    
    set_custom_property ('CHART_DISP.SIMPLEGRAPH',1,'ADD_ROWDATA',CDATA);
    COUNTER := COUNTER +1;
    FETCH C_DETAIL INTO var1,var2,var3,var4,value,Category1,Category2;
                   END LOOP;
                             SET_CUSTOM_PROPERTY('CHART_DISP.SIMPLEGRAPH',1,'GRAPHTYPE','PIE_GRAPH');
                             SET_CUSTOM_PROPERTY('CHART_DISP.SIMPLEGRAPH',1,'COLUMNCOUNT','');
    set_custom_property('CHART_DISP.SIMPLEGRAPH',1,'ADD_DATA_TO_GRAPH','');
    CLOSE C_DETAIL;
    set_custom_property('CHART_DISP.SIMPLEGRAPH',1,'SHOW_GRAPH','');
    EXCEPTION
         WHEN OTHERS THEN
         MESSAGE('SQLCODE='||SQLCODE||SQLERRM);
         MESSAGE('SQLCODE='||SQLCODE||SQLERRM);
    end;

    Hi,
    please see the html help file (graph90.html) that comes with the Graph bean sample. The debug option is enabled with a call to set_custom_poperty('blockname.beanarea',1,'DEBUG', true)
    The messages are written to teh JInitiator console (see right bottom corner of windows to open)
    Frank

  • Why the Oracle SQL Developer show Chinese abnormally?

    In my Oracle SQL Developer I see Chinese convert to error code such as "��介�Ε⑼�〩� ".
    My Oracle chartset is "ZHT32EUC" and Oracle SQL Developer Code is "MS950" by default.
    How can I set the corresponding code set to "ZHT32EUC" in Oracle SQL Developer?

    Hi,
    Does the machine already has files for East Asian languages and/or complex scripts options in the Supplemental Language Support section of the Languages tab for the Regional and Language Options setting installed (for WinXP machine)?
    - limoey

Maybe you are looking for

  • Error while updating account dim

    I get the below error while updating the Outline Account Dim.This error occurs only when updating account dim. It does not happen with other dimensions. So it doesn't seem to be the connection being down. If we recycle the analytics server. But we ar

  • Firewall in 10.5, how to open ports and how to manage?

    I am pulling my hair out with the new firewall in 10.5. In 10.4 I could just set ports as I liked in the control panel, in 10.5 there is no such thing. I need to for example open port 49999 to allow PageSender to function in my network. I need to ope

  • My Adobe Flash CS6 Color Picker has ODD colors. I'm using Mac Mini OSX 10.8.1. Is there a fix?

    My Adobe Flash CS6 Color Picker has ODD colors. I'm using Mac Mini OSX 10.8.1. Is there a fix? I click on the color picker and where I have seen the normal #0000ff blue color on my windows computer, this mac Mountain lion version shows a purple-ish c

  • 4.6 C to ECC 6.0 Upgrade Project Timeline Sheet in MPP format

    Dear all, We are now proposing our customer for the 4.6c to ECC 6.0 Upgrade. Our customer is currently in 4.6c/oracle 9i/HPUX 11 i. He wants to move to ECC 6.0. If you have the project timeline for the above Technical Upgrade, can you pl send it to m

  • Connecting oracle with php

    hi all, i am using Xammp 1.7.4, PHP version 5.3.5, apache 2.2, and oracle 11g. actually i know how to connect MySql using php, but now i am trying to connect oracle using php. Can any 1 tell me the clear cut steps to do the same ?