Plss help me solve this codes

to those expert in java programming, i am new to java and i encounter a problem within my codes. You see, the program is supposed to be counting multiple numbers of the items as well as its price too. But i only can input 1 price i'll give you the code if you all don't really mind
import javax.swing.JOptionPane;
public class disc {
     public static void main (String[] args){
     String bil=JOptionPane.showInputDialog(null,"Bilangan barang ialah","Bilangan",JOptionPane.QUESTION_MESSAGE);
     int bil1=Integer.parseInt(bil);
     double jumlah=0; //jumlah harga
     double diskaun=0; //jumlah diskaun
     double jum=0; //jumlah selepas diskaun
     int i;
     int b=1;
     for (i=1; i<=bil1; i++){
     String Har=JOptionPane.showInputDialog(null,"Harga barang ke-"+b,"Harga",JOptionPane.QUESTION_MESSAGE);
     double harga=Double.parseDouble(Har);
     jumlah=jumlah+harga;
     b++;
     if (bil1>=1000){
          if (jumlah<=10.00)
          diskaun=jumlah*0.21;
          else
          if ((jumlah>=10.01) && (jumlah<=100.00))
          diskaun=jumlah*0.32;
          else
          diskaun=jumlah*0.43;
     else
     if ((bil1>=500) && (bil1<=999)){
          if (jumlah<=10.00)
          diskaun=jumlah*0.09;
          else
          if ((jumlah>=10.01) && (jumlah<=100.00))
          diskaun=jumlah*0.15;
          else
          diskaun=jumlah*0.21;
     else
     if ((bil1>=100) && (bil1<=499)){
          if (jumlah<=10.00)
          diskaun=jumlah*0.05;
          else
          if ((jumlah>=10.01) && (jumlah<=100.00))
          diskaun=jumlah*0.07;
          else
          diskaun=jumlah*0.09;
     else
     if ((bil1>=10) && (bil1<=99)){
          if ((jumlah>=10.01) && (jumlah<=100.00))
          diskaun=jumlah*0.02;
          else
          if (jumlah>=100.01)
          diskaun=jumlah*0.05;
     jum=jumlah-diskaun;
     JOptionPane.showMessageDialog (null,"Jumlah harga ialah RM" jumlah "Jumlah diskaun ialah RM" diskaun "Jumlah harga selepas diskaun ialah RM"+jum,"Jumlah",JOptionPane.INFORMATION_MESSAGE);
     System.exit(0);
plss help me solve the prob

I am having trouble understanding your code and question, partly to do with the formatting (as mentioned above), but also to do with the language barrier.
I don't know what I am being prompted for, and the variable names mean nothing to me, so translating these (even into broken English) would be a good start.
Secondly, you are saying you want two inputs (I think), but you only get to input bill once, this is because:
        String bil= JOptionPane.showInputDialog(null,"Bilangan barang ialah","Bilangan",JOptionPane.QUESTION_MESSAGE); is outside the FOR loop, so only run once. The only time you are asking for any input inside the loop is with:
            String Har=JOptionPane.showInputDialog(null,"Harga barang ke-"+b,"Harga",JOptionPane.QUESTION_MESSAGE);which is run several times.
If you want to take more than one ?bill?, you need to either implement another loop somewhere (either two separate loops or nested, depending what you are trying to do), or have another input dialog inside the loop.
I am sorry I cannot be more specific, this is only because I don't understand what you are trying to do.

Similar Messages

  • Can anyone help me to solve this code , its in a swing , jseparator...

    hey
    can any one solve this code ??
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class File1 extends JFrame
              public static void showgui()
                   frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   JLabel emptyLabel = new JLabel("");
         emptyLabel.setPreferredSize(new Dimension(640, 480));
         frame.getContentPane().add(emptyLabel, BorderLayout.CENTER);
                   JButton b1= new JButton("JENIS");
                   add(b1);
                   b1.setBounds(350,220,120,20);
                   JSeparator jE =new JSeparator(JSeparator.HORIZONTAL);
                   jE.setBounds(350, 205, 120, 20);
                   add(jE);
                   add(new JSeparator(JSeparator.HORIZONTAL));
                   JButton b2= new JButton("MODI");
                   add(b2);
                   b2.setBounds(100,210,100,100);
                   frame.pack();
         frame.setVisible(true);
    public static void main(String[] args)
         javax.swing.SwingUtilities.invokeLater(new Runnable()
              public void run()
                   showgui();
    actually i want to use jseparator , so if this cant be solved , send me another code that uses jseparator and gives the vertical / horizontal line between two buttons??
    Its urgent ,
    waiting for reply............

    Hi,
    Is this ok?
    public class NewJFrameSep extends javax.swing.JFrame {
            public NewJFrameSep() {
            initComponents();
        private void initComponents() {
            jSeparator1 = new javax.swing.JSeparator();
            jButton1 = new javax.swing.JButton();
            jButton2 = new javax.swing.JButton();
            getContentPane().setLayout(null);
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            getContentPane().add(jSeparator1);
            jSeparator1.setBounds(110, 120, 170, 100);
            jButton1.setText("jButton1");
            getContentPane().add(jButton1);
            jButton1.setBounds(160, 80, 71, 23);
            jButton2.setText("jButton2");
            getContentPane().add(jButton2);
            jButton2.setBounds(160, 140, 71, 23);
            pack();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrameSep().setVisible(true);
       private javax.swing.JButton jButton1;
        private javax.swing.JButton jButton2;
        private javax.swing.JSeparator jSeparator1;
    }regards
    dina

  • Can anyone help me solving this problem with Mail?

    I haven´t being able to send emails with MAIL for two days. I have managed 7 email accounts with 3 different servers for more than 2 years with no problem until last Monday.
    Basically, what I can notice as unusual is this message from Connection Inspector:
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    But I have copy/pasted what Connection Inspector says:
    urityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x117b0fc60 -- thread:0x117b8b340
    +OK
    WROTE Oct 16 14:09:36.480 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    CAPA
    READ Oct 16 14:09:36.531 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11867d520 -- thread:0x11734ba80
    +OK
    WROTE Oct 16 14:09:36.552 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    USER [email protected]
    WROTE Oct 16 14:09:36.622 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    USER [email protected]
    READ Oct 16 14:09:36.640 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1181804d0 -- thread:0x118731cd0
    250-dime124.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    WROTE Oct 16 14:09:36.666 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x11adb69c0 -- thread:0x11445b140
    EHLO [192.168.2.5]
    READ Oct 16 14:09:36.677 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x11d403520 -- thread:0x11d40e9f0
    250-dime155.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    WROTE Oct 16 14:09:36.694 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    USER [email protected]
    WROTE Oct 16 14:09:36.720 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    USER [email protected]
    WROTE Oct 16 14:09:36.744 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x117b0fc60 -- thread:0x117b8b340
    PASS ********
    WROTE Oct 16 14:09:36.795 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11867d520 -- thread:0x11734ba80
    PASS ********
    READ Oct 16 14:09:36.806 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    READ Oct 16 14:09:36.870 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    +OK
    WROTE Oct 16 14:09:36.871 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1181804d0 -- thread:0x118731cd0
    QUIT
    WROTE Oct 16 14:09:36.924 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x11d403520 -- thread:0x11d40e9f0
    QUIT
    READ Oct 16 14:09:36.948 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    +OK
    READ Oct 16 14:09:36.996 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x11adb69c0 -- thread:0x11445b140
    250-dime124.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    READ Oct 16 14:09:37.012 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    +OK
    READ Oct 16 14:09:37.054 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    +OK
    WROTE Oct 16 14:09:37.065 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    USER [email protected]
    READ Oct 16 14:09:37.087 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x117b0fc60 -- thread:0x117b8b340
    +OK Logged in.
    WROTE Oct 16 14:09:37.094 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    PASS ********
    READ Oct 16 14:09:37.124 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11867d520 -- thread:0x11734ba80
    +OK Logged in.
    WROTE Oct 16 14:09:37.179 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    PASS ********
    WROTE Oct 16 14:09:37.219 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x11adb69c0 -- thread:0x11445b140
    QUIT
    WROTE Oct 16 14:09:37.246 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    PASS ********
    WROTE Oct 16 14:09:37.274 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    PASS ********
    WROTE Oct 16 14:09:37.331 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x117b0fc60 -- thread:0x117b8b340
    QUIT
    READ Oct 16 14:09:37.384 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    +OK
    WROTE Oct 16 14:09:37.388 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11867d520 -- thread:0x11734ba80
    QUIT
    READ Oct 16 14:09:37.421 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    +OK Logged in.
    READ Oct 16 14:09:37.519 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    +OK Logged in.
    WROTE Oct 16 14:09:37.578 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    PASS ********
    READ Oct 16 14:09:37.580 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    +OK Logged in.
    READ Oct 16 14:09:37.602 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    +OK Logged in.
    READ Oct 16 14:09:37.649 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x117b0fc60 -- thread:0x117b8b340
    +OK Logging out.
    WROTE Oct 16 14:09:37.657 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    QUIT
    WROTE Oct 16 14:09:37.680 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    QUIT
    READ Oct 16 14:09:37.705 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11867d520 -- thread:0x11734ba80
    +OK Logging out.
    WROTE Oct 16 14:09:37.731 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    QUIT
    WROTE Oct 16 14:09:37.756 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    QUIT
    READ Oct 16 14:09:37.915 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    +OK Logged in.
    WROTE Oct 16 14:09:37.945 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    QUIT
    READ Oct 16 14:09:37.976 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x119c3e2f0 -- thread:0x1189210d0
    +OK Logging out.
    READ Oct 16 14:09:38.010 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x11d40d8c0 -- thread:0x114462fe0
    +OK Logging out.
    READ Oct 16 14:09:38.051 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11863c650 -- thread:0x1168cdf20
    +OK Logging out.
    READ Oct 16 14:09:38.079 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x117349340 -- thread:0x1005af900
    +OK Logging out.
    READ Oct 16 14:09:38.270 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x118714190 -- thread:0x11872ee70
    +OK Logging out.
    CONNECTED Oct 16 14:11:00.752 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    CONNECTED Oct 16 14:11:00.752 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    CONNECTED Oct 16 14:11:00.753 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    CONNECTED Oct 16 14:11:00.754 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    CONNECTED Oct 16 14:11:00.755 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    CONNECTED Oct 16 14:11:00.755 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:25 -- socket:0x11ad0a7d0 -- thread:0x11b3406f0
    CONNECTED Oct 16 14:11:00.756 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    CONNECTED Oct 16 14:11:00.756 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:25 -- socket:0x119c94890 -- thread:0x11d40a2a0
    CONNECTED Oct 16 14:11:00.757 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    CONNECTED Oct 16 14:11:00.757 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x1179d3df0 -- thread:0x11731e680
    READ Oct 16 14:11:03.770 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:25 -- socket:0x11ad0a7d0 -- thread:0x11b3406f0
    451-The server has reached its limit for processing requests from your host.
    451 Please try again later.
    READ Oct 16 14:11:03.770 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:25 -- socket:0x119c94890 -- thread:0x11d40a2a0
    451-The server has reached its limit for processing requests from your host.
    451 Please try again later.
    READ Oct 16 14:11:03.777 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x1179d3df0 -- thread:0x11731e680
    220-dime155.dizinc.com ESMTP Exim 4.80 #2 Wed, 16 Oct 2013 13:11:02 -0400
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    WROTE Oct 16 14:11:03.863 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x1179d3df0 -- thread:0x11731e680
    EHLO [192.168.2.5]
    CONNECTED Oct 16 14:11:04.165 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x117944c00 -- thread:0x11b3406f0
    CONNECTED Oct 16 14:11:04.168 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1179f2fe0 -- thread:0x11d40a2a0
    READ Oct 16 14:11:04.193 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x1179d3df0 -- thread:0x11731e680
    250-dime155.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    WROTE Oct 16 14:11:04.242 [kCFStreamSocketSecurityLevelNone]  -- host:mail.lamontana.com -- port:587 -- socket:0x1179d3df0 -- thread:0x11731e680
    QUIT
    READ Oct 16 14:11:04.262 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    +OK Dovecot ready.
    WROTE Oct 16 14:11:04.300 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    CAPA
    READ Oct 16 14:11:04.486 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    +OK Dovecot ready.
    READ Oct 16 14:11:04.491 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    +OK Dovecot ready.
    READ Oct 16 14:11:04.493 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    +OK Dovecot ready.
    READ Oct 16 14:11:04.495 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x117944c00 -- thread:0x11b3406f0
    220-dime124.dizinc.com ESMTP Exim 4.80.1 #2 Wed, 16 Oct 2013 13:11:05 -0400
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    READ Oct 16 14:11:04.496 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    +OK Dovecot ready.
    READ Oct 16 14:11:04.497 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1179f2fe0 -- thread:0x11d40a2a0
    220-dime124.dizinc.com ESMTP Exim 4.80.1 #2 Wed, 16 Oct 2013 13:11:05 -0400
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    READ Oct 16 14:11:04.499 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    +OK Dovecot ready.
    WROTE Oct 16 14:11:04.511 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    CAPA
    WROTE Oct 16 14:11:04.536 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    CAPA
    WROTE Oct 16 14:11:04.561 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    CAPA
    READ Oct 16 14:11:04.586 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    +OK Dovecot ready.
    WROTE Oct 16 14:11:04.594 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x117944c00 -- thread:0x11b3406f0
    EHLO [192.168.2.5]
    WROTE Oct 16 14:11:04.614 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    CAPA
    READ Oct 16 14:11:04.625 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    WROTE Oct 16 14:11:04.648 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1179f2fe0 -- thread:0x11d40a2a0
    EHLO [192.168.2.5]
    WROTE Oct 16 14:11:04.667 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    CAPA
    WROTE Oct 16 14:11:04.778 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    CAPA
    READ Oct 16 14:11:04.838 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    WROTE Oct 16 14:11:04.859 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    USER [email protected]
    READ Oct 16 14:11:04.865 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    READ Oct 16 14:11:04.886 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    READ Oct 16 14:11:04.921 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x117944c00 -- thread:0x11b3406f0
    250-dime124.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    READ Oct 16 14:11:04.938 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    READ Oct 16 14:11:04.974 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1179f2fe0 -- thread:0x11d40a2a0
    250-dime124.dizinc.com Hello [192.168.2.5] [190.49.30.228]
    250-SIZE 52428800
    250-8BITMIME
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    WROTE Oct 16 14:11:04.975 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    USER [email protected]
    READ Oct 16 14:11:04.989 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    WROTE Oct 16 14:11:05.027 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    USER [email protected]
    WROTE Oct 16 14:11:05.052 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    USER [email protected]
    WROTE Oct 16 14:11:05.080 [kCFStreamSocketSecurityLevelNone]  -- host:mail.spanishinbariloche.com -- port:587 -- socket:0x117944c00 -- thread:0x11b3406f0
    QUIT
    READ Oct 16 14:11:05.107 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    +OK
    CAPA
    TOP
    UIDL
    RESP-CODES
    PIPELINING
    USER
    SASL PLAIN LOGIN
    WROTE Oct 16 14:11:05.116 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    USER [email protected]
    WROTE Oct 16 14:11:05.143 [kCFStreamSocketSecurityLevelNone]  -- host:mail.fundaciondeloslagos.org -- port:587 -- socket:0x1179f2fe0 -- thread:0x11d40a2a0
    QUIT
    READ Oct 16 14:11:05.182 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    +OK
    WROTE Oct 16 14:11:05.200 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    USER [email protected]
    READ Oct 16 14:11:05.303 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    +OK
    WROTE Oct 16 14:11:05.320 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    USER [email protected]
    READ Oct 16 14:11:05.355 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    +OK
    READ Oct 16 14:11:05.379 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    +OK
    WROTE Oct 16 14:11:05.406 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    PASS ********
    READ Oct 16 14:11:05.440 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    +OK
    WROTE Oct 16 14:11:05.476 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    PASS ********
    READ Oct 16 14:11:05.523 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    +OK
    WROTE Oct 16 14:11:05.534 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    PASS ********
    WROTE Oct 16 14:11:05.565 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    PASS ********
    WROTE Oct 16 14:11:05.624 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    PASS ********
    READ Oct 16 14:11:05.648 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    +OK
    WROTE Oct 16 14:11:05.690 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    PASS ********
    READ Oct 16 14:11:05.742 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    +OK Logged in.
    WROTE Oct 16 14:11:05.811 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    PASS ********
    WROTE Oct 16 14:11:05.864 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    QUIT
    READ Oct 16 14:11:05.872 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    +OK Logged in.
    READ Oct 16 14:11:05.901 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    +OK Logged in.
    WROTE Oct 16 14:11:05.947 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    QUIT
    READ Oct 16 14:11:05.969 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    +OK Logged in.
    WROTE Oct 16 14:11:05.971 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    QUIT
    READ Oct 16 14:11:05.987 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    +OK Logged in.
    WROTE Oct 16 14:11:06.023 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    QUIT
    READ Oct 16 14:11:06.028 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    +OK Logged in.
    WROTE Oct 16 14:11:06.080 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    QUIT
    WROTE Oct 16 14:11:06.132 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    QUIT
    READ Oct 16 14:11:06.154 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    +OK Logged in.
    READ Oct 16 14:11:06.189 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x115fbf290 -- thread:0x11867d890
    +OK Logging out.
    WROTE Oct 16 14:11:06.214 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    QUIT
    READ Oct 16 14:11:06.273 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.fundaciondeloslagos.org -- port:995 -- socket:0x11d4f2e80 -- thread:0x118150ca0
    +OK Logging out.
    READ Oct 16 14:11:06.294 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1173e2b40 -- thread:0x1189fad80
    +OK Logging out.
    READ Oct 16 14:11:06.346 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x11864c2e0 -- thread:0x117b48800
    +OK Logging out.
    READ Oct 16 14:11:06.406 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.lamontana.com -- port:995 -- socket:0x1167388b0 -- thread:0x116677ef0
    +OK Logging out.
    READ Oct 16 14:11:06.453 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1167c5cf0 -- thread:0x118151ef0
    +OK Logging out.
    READ Oct 16 14:11:06.540 [kCFStreamSocketSecurityLevelNegotiatedSSL]  -- host:mail.spanishinbariloche.com -- port:995 -- socket:0x1168c80b0 -- thread:0x1188b42a0
    +OK Logging out.

    Deep1974 wrote:
    Can anyone help me solving this question with explaination .
    Given:
    11. public String makinStrings() {
    12. String s = ?Fred?;
    13. s = s + ?47?;
    14. s = s.substring(2, 5);
    15. s = s.toUpperCase();
    16. return s.toString();
    17. }
    How many String objects will be created when this method is invoked?
    A. 1
    B. 2
    C. 3
    D. 4
    E. 5
    F. 61 is created at line 13 as a result of StringBuilder.toString().
    1 is created at line 14 as a result of substring().
    1 is created at line 15 as a result of toUpperCase().
    The Strings "Fred" and "47" at lines 12 and 13 are NOT created when that method is invoked. They are created when the class is loaded.
    Note, however, that some of this is based on current implementations, NOT on requirements of the JLS or VM spec, so really, the answers could be different. Overall, it's a poorly thought out question.
    Edited by: jverd on Jan 28, 2010 2:35 PM

  • I am not able to launch FF everytime i tr to open it, it says FF has to submit a crash report, i even tried doing that and the report was submitted too, but stiil FF did not start, and the problem still persists, please help me solve this issue in English

    Question
    I am not able to launch FF everytime i try to open it, it says FF has to submit a crash report,and restore yr tabs. I even tried doing that and the report was submitted too, but still FF did not start, and the problem still persists, please help me solve this issue
    '''(in English)'''

    Hi Danny,
    Per my understanding that you can't get the expect result by using the expression "=Count(Fields!TICKET_STATUS.Value=4) " to count the the TICKET_STATUS which value is 4, the result will returns the count of all the TICKET_STATUS values(206)
    but not 180, right?
    I have tested on my local environment and can reproduce the issue, the issue caused by you are using the count() function in the incorrect way, please modify the expression as below and have a test:
    =COUNT(IIF(Fields!TICKET_STATUS.Value=4 ,1,Nothing))
    or
    =SUM(IIF(Fields!TICKET_STATUS=4,1,0))
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • My icloud activation lock is ON my iphone, which requires an activation login to access the homescreen, but when i log in with the apple ID on the phone, it says the apple ID is not meant to unclock this iphone 5 ios 8.0.2. please help me solve this.

    My icloud activation lock is on my iphone, which requires an activation login to access the homescreen, but when i log in with the apple ID on the phone, it says the apple ID is not meant to unclock this iphone 5 ios 8.0.2. please help me solve this.

    Yes the phone belongs to me. It was purchased from United Kingdom Vodafone to West Africa, i had to factory unlock to use any sim in it. so it belongs to me. I did the activation myself, now after updating my iphone to the latest update, it required a user id and password to activate the phone, but anytime i enter the details, it tells me the user Id is not correct but the password is correct..

  • Can somebody help me with this code?

    Can anyone help me with this code? My problem is that i can't
    seem to position this form, i want to be able to center it
    vertically & horizontally in a div either using CSS or any
    other means.
    <div id="searchbar"><!--Search Bar -->
    <div id="searchcart">
    <div class="serchcartcont">
    <form action='
    http://www.romancart.com/search.asp'
    name="engine" target=searchwin id="engine">
    <input type=hidden value=????? name=storeid>
    <input type=text value='' name=searchterm>
    <input type=submit value='Go'> </form>
    </div>
    </div>
    <div class="searchcont">Search For
    Products:</div>
    </div><!-- End Search Bar -->
    Pleasssssseeeeeeee Help
    Thanks

    Hi,
    Your form is defined in a div named "serchcartcont", you can
    use attributes like position and align of the div to do what you
    want to do. But there are two more dives above this dive, you will
    have define the height width of these before you can center align
    the inner most div. If you are not defining the height & width
    then by default it decide it automatically to just fit the content
    in it.
    Hope this helps.
    Maneet
    LeXolution IT Services
    Web Development
    Company

  • Calendar and Time showing in arabic but my phone's language is English. I bought my phone from DU in UAE , Dubai. Please help me solve this issue while keeping the Region to United Arab Emirates

    Calendar and Time showing in arabic but my phone's language is English. I bought my phone from DU in UAE , Dubai. Please help me solve this issue while keeping the Region to United Arab Emirates

    Valentine350z wrote:
    while keeping the Region to United Arab Emirates
    Not possible, I think.  Tell Apple how you feel about this at
    http://www.apple.com/feedback/iphone.html

  • Help needed in this code

    Hi guys, I need help in debugging this code I made, which is a GUI minesweeper. Its extremely buggy...I particularly need help fixing the actionListener part of the code as everytime I press a button on the GUI, an exception occurs.
    help please!
    package minesweeperGUI;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MinesweeperGUI implements ActionListener
         //Declaration of attributes
         static int length = 0;
         JMenuItem menuItemNew = new JMenuItem();
         JRadioButtonMenuItem rbEasy = new JRadioButtonMenuItem();
         JRadioButtonMenuItem rbHard = new JRadioButtonMenuItem();
         JMenuItem menuItemExit = new JMenuItem();
         JButton buttonReset = new JButton();
         JButton buttonGrid[][] = null;
         JFrame frame = new JFrame();
         int getBombsTotal = 0;
         JLabel setBombsLabel = new JLabel();
         int a = 0;
         int b = 0;     
         //No constructor created. Uses default constructor
         //Create the menu bar
         public JMenuBar newMenuBar()
              //Sets up the menubar
              JMenuBar menuBar = new JMenuBar();
              //Sets up the Game menu with choice of new, grid size, and exit
              JMenu menu = new JMenu ("Game");
              menuBar.add (menu);
              menuItemNew = new JMenuItem ("New");
              menuItemNew.addActionListener (this);
              menu.add (menuItemNew);
              menu.addSeparator();
              //Sets up sub-menu for grid size with choice of easy and hard radio buttons
              JMenu subMenu = new JMenu ("Grid Size");
              rbEasy = new JRadioButtonMenuItem ("Easy: 5x5 grid");
              rbEasy.addActionListener (this);
              subMenu.add (rbEasy);
              rbHard = new JRadioButtonMenuItem ("Hard: 10x10 grid");
              rbHard.addActionListener (this);
              subMenu.add (rbHard);
              menu.add (subMenu);
              menu.addSeparator();
              menuItemExit = new JMenuItem ("Exit");
              menuItemExit.addActionListener (this);
              menu.add (menuItemExit);
              return menuBar;
         //Setting up of Bomb Grid
         public int [][] setGrid (int length)
              int grid[][] = null;
              grid = new int[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        grid[i][j] = ((int)Math.round(Math.random() * 10))% 2;
              return grid;     
         //Setting up of the of the graphical bomb grid
         public JButton[][] setButtonGrid (int length)
              JButton buttonGrid[][] = null;
              buttonGrid = new JButton[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = new JButton();
              return buttonGrid;
         //Setting up of a way to count the total number of bombs in the bomb grid
         public int getBombsTotal (int length, int setGrid[][])
              int bombsTotal = 0;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (setGrid[i][j] == 1)
                             bombsTotal += 1;
              return bombsTotal;
         //Create a label for number of bombs left
         public JLabel setBombsLabel (int getBombsTotal)
              JLabel bombsLabel = new JLabel(String.valueOf (getBombsTotal) + " Bombs Left");
              return bombsLabel;
         //Setting up a way to count the number of bombs around a button
         public String setBombs (int length, int setGrid[][], int x, int y)
              int bombs[][] = new int[length][length];
              String bombsString = null;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (i == 0 && j == 0)
                             bombs[i][j] = setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i ==0 && j == (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else if (i == (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1];
                        else if (i == (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1];
                        else if (i == 0 && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i][j+1] +
                                  setGrid[i+1][j-1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i == (length - 1) && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1];
                        else if (i != 0 && i != (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i != 0 && i != (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j] + setGrid[i+1][j+1];
              bombsString = String.valueOf (bombs[x][y]);
              return bombsString;
         //create the panel for the bombs label and reset button
         public JPanel newTopPanel(int length)
              int setGridNew [][] = null;
              setGridNew = new int[length][length];
              int getBombsTotalNew = 0;
              JLabel setBombsLabelNew = new JLabel();
              setGridNew = setGrid (length);
              getBombsTotalNew = getBombsTotal (length, setGridNew);
              setBombsLabelNew = setBombsLabel (getBombsTotalNew);
              JPanel topPanel = new JPanel ();
              topPanel.setLayout (new BorderLayout (50,50));
              JLabel bombsLabel = new JLabel ();
              bombsLabel = setBombsLabelNew;     
              topPanel.add (bombsLabel, BorderLayout.WEST);
              buttonReset = new JButton("Reset");
              buttonReset.addActionListener (this);
              topPanel.add (buttonReset, BorderLayout.CENTER);
              return topPanel;
         //create the panel for the play grids
         public JPanel newBottomPanel(int length)
              JButton setButtonGridNew[][] = null;
              setButtonGridNew = new JButton [length][length];
              setButtonGridNew = setButtonGrid (length);
              JPanel bottomPanel = new JPanel ();
              bottomPanel.setLayout (new GridLayout (length, length));
              buttonGrid = new JButton[length][length];          
              for (a = 0; a < length; a++)
                   for (b = 0; b < length; b++)
                        buttonGrid[a] = setButtonGridNew[a][b];
                        buttonGrid[a][b].addActionListener (this);
                        bottomPanel.add (buttonGrid[a][b]);
              return bottomPanel;
         //Overiding of abstract method actionPerformed
         public void actionPerformed(ActionEvent e)
              if (e.getSource() == menuItemNew)
                   launchFrame(length);
              else if (e.getSource() == menuItemExit)
                   frame.setVisible (false);
                   System.exit(0);
              else if (e.getSource() == rbEasy)
                   length = 5;
                   launchFrame(length);
              else if (e.getSource() == rbHard)
                   length = 10;
                   launchFrame(length);     
              else if (e.getSource() == buttonReset)
                   launchFrame(length);
              else if (e.getSource() == buttonGrid[a][b])
                   int setGridNew [][] = null;
                   setGridNew = new int[length][length];               
                   JButton bombButton [][] = null;
                   bombButton = new JButton [length][length];
                   String bombString [][] = null;
                   bombString = new String[length][length];
                   setGridNew = setGrid (length);               
                   bombString[a][b] = setBombs (length, setGridNew, a, b);
                   bombButton[a][b] = new JButton (bombString[a][b]);
                   if (setGridNew[a][b] == 0)
                        buttonGrid[a][b] = bombButton[a][b];
                        getBombsTotal--;
                        JLabel setBombsLabelNew = new JLabel();
                        setBombsLabelNew = setBombsLabel (getBombsTotal);
                   else if (setGridNew[a][b] == 1 )
                        buttonGrid[a][b] = new JButton("x");
                        JOptionPane.showMessageDialog (null, "Game Over. You hit a Bomb!");
                        System.exit(0);     
         //create the content pane
         public Container newContentPane(int length)
              JPanel topPanel = new JPanel();
              JPanel bottomPanel = new JPanel();          
              topPanel = newTopPanel(length);
              bottomPanel = newBottomPanel (length);
              JPanel contentPane = new JPanel();
              contentPane.setOpaque (true);
              contentPane.setLayout (new BorderLayout(50,50));
              contentPane.add (topPanel, BorderLayout.NORTH);
              contentPane.add (bottomPanel, BorderLayout.CENTER);
              return contentPane;
         public void launchFrame (int length)
              //Makes sure we have nice window decorations
              JFrame.setDefaultLookAndFeelDecorated(true);          
              //Sets up the top-level window     
              frame = new JFrame ("Minesweeper");
              //Exits program when the closed button is clicked
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              JMenuBar menuBar = new JMenuBar();
              Container contentPane = new Container();
              menuBar = newMenuBar();
              contentPane = newContentPane (length);
              //Sets up the menu bar and content pane
              frame.setJMenuBar (menuBar);
              frame.setContentPane (contentPane);
              //Displays the window
              frame.pack();
              frame.setVisible (true);
         public static void main (String args[])
              //Default length is 5
              length = 5;
              MinesweeperGUI minesweeper = new MinesweeperGUI();
              minesweeper.launchFrame(length);

    hi, thanks. that removed the exception; although now the buttons action listener won't work :(
    here is the revised code:
    To anyone out there, can you guys run this code and help me debug it?
    I'm really desperate as this is a school project of mine and the deadline is 7 hours away. I have already been working on it for 3 days, but the program is still very buggy.
    thanks!
    /* Oliver Ian C. Wee 04-80112
    * CS12 MHRU
    * Machine Problem 2
    package minesweeperGUI;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MinesweeperGUI implements ActionListener
         //Declaration of attributes
         static int length = 0;
         JMenuItem menuItemNew = new JMenuItem();
         JRadioButtonMenuItem rbEasy = new JRadioButtonMenuItem();
         JRadioButtonMenuItem rbHard = new JRadioButtonMenuItem();
         JMenuItem menuItemExit = new JMenuItem();
         JButton buttonReset = new JButton();
         JButton buttonGrid[][] = null;
         JFrame frame = new JFrame();
         int getBombsTotal = 0;
         JLabel setBombsLabel = new JLabel();
         int a = 0;
         int b = 0;
         //No constructor created. Uses default constructor
         //Create the menu bar
         public JMenuBar newMenuBar()
              //Sets up the menubar
              JMenuBar menuBar = new JMenuBar();
              //Sets up the Game menu with choice of new, grid size, and exit
              JMenu menu = new JMenu ("Game");
              menuBar.add (menu);
              menuItemNew = new JMenuItem ("New");
              menuItemNew.addActionListener (this);
              menu.add (menuItemNew);
              menu.addSeparator();
              //Sets up sub-menu for grid size with choice of easy and hard radio buttons
              JMenu subMenu = new JMenu ("Grid Size");
              ButtonGroup bg = new ButtonGroup();
              rbEasy = new JRadioButtonMenuItem ("Easy: 5x5 grid");
              bg.add (rbEasy);
              rbEasy.addActionListener (this);
              subMenu.add (rbEasy);
              rbHard = new JRadioButtonMenuItem ("Hard: 10x10 grid");
              bg.add (rbHard);
              rbHard.addActionListener (this);
              subMenu.add (rbHard);
              menu.add (subMenu);
              menu.addSeparator();
              menuItemExit = new JMenuItem ("Exit");
              menuItemExit.addActionListener (this);
              menu.add (menuItemExit);
              return menuBar;
         //Setting up of Bomb Grid
         public int [][] setGrid (int length)
              int grid[][] = null;
              grid = new int[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        grid[i][j] = ((int)Math.round(Math.random() * 10))% 2;
              return grid;     
         //Setting up of the of the graphical bomb grid
         public JButton[][] setButtonGrid (int length)
              JButton buttonGrid[][] = null;
              buttonGrid = new JButton[length][length];
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = new JButton();
              return buttonGrid;
         //Setting up of a way to count the total number of bombs in the bomb grid
         public int getBombsTotal (int length, int setGrid[][])
              int bombsTotal = 0;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (setGrid[i][j] == 1)
                             bombsTotal += 1;
              return bombsTotal;
         //Create a label for number of bombs left
         public JLabel setBombsLabel (int getBombsTotal)
              JLabel bombsLabel = new JLabel("  " +String.valueOf (getBombsTotal) + " Bombs Left");
              return bombsLabel;
         //Setting up a way to count the number of bombs around a button
         public String setBombs (int length, int setGrid[][], int x, int y)
              int bombs[][] = new int[length][length];
              String bombsString = null;
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        if (i == 0 && j == 0)
                             bombs[i][j] = setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i ==0 && j == (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else if (i == (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1];
                        else if (i == (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1];
                        else if (i == 0 && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i][j-1] + setGrid[i][j+1] +
                                  setGrid[i+1][j-1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i == (length - 1) && j != 0 && j != (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1];
                        else if (i != 0 && i != (length - 1) && j == 0)
                             bombs[i][j] = setGrid[i-1][j] + setGrid[i-1][j+1] +
                                  setGrid[i][j+1] + setGrid[i+1][j] +
                                  setGrid[i+1][j+1];
                        else if (i != 0 && i != (length - 1) && j == (length - 1))
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i][j-1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j];
                        else
                             bombs[i][j] = setGrid[i-1][j-1] + setGrid[i-1][j] +
                                  setGrid[i-1][j+1] + setGrid[i][j-1] +
                                  setGrid[i][j+1] + setGrid[i+1][j-1] +
                                  setGrid[i+1][j] + setGrid[i+1][j+1];
              bombsString = String.valueOf (bombs[x][y]);
              return bombsString;
         //create the panel for the bombs label and reset button
         public JPanel newTopPanel(int length)
              int setGridNew [][] = null;
              setGridNew = new int[length][length];
              int getBombsTotalNew = 0;
              JLabel setBombsLabelNew = new JLabel();
              setGridNew = setGrid (length);
              getBombsTotalNew = getBombsTotal (length, setGridNew);
              setBombsLabelNew = setBombsLabel (getBombsTotalNew);
              JPanel topPanel = new JPanel ();
              topPanel.setLayout (new BorderLayout (20,20));
              JLabel bombsLabel = new JLabel ();
              bombsLabel = setBombsLabelNew;     
              topPanel.add (bombsLabel, BorderLayout.WEST);
              buttonReset = new JButton("Reset");
              buttonReset.addActionListener (this);
              topPanel.add (buttonReset, BorderLayout.CENTER);
              return topPanel;
         //create the panel for the play grids
         public JPanel newBottomPanel(int length)
              JButton setButtonGridNew[][] = null;
              setButtonGridNew = new JButton [length][length];
              setButtonGridNew = setButtonGrid (length);
              JPanel bottomPanel = new JPanel ();
              bottomPanel.setLayout (new GridLayout (length, length));
              buttonGrid = new JButton[length][length];          
              for (int i = 0; i < length; i++)
                   for (int j = 0; j < length; j++)
                        buttonGrid[i][j] = setButtonGridNew[i][j];
                        buttonGrid[i][j].addActionListener (this);
                        bottomPanel.add (buttonGrid[i][j]);
              return bottomPanel;
         //Overiding of abstract method actionPerformed
         public void actionPerformed(ActionEvent e)
              if (e.getSource() == menuItemNew)
                   closeFrame();
                   launchFrame(length);
              else if (e.getSource() == menuItemExit)
                   frame.setVisible (false);
                   System.exit(0);
              else if (e.getSource() == rbEasy)
                   closeFrame();
                   length = 5;
                   launchFrame(length);
              else if (e.getSource() == rbHard)
                   closeFrame();
                   length = 10;
                   launchFrame(length);     
              else if (e.getSource() == buttonReset)
                   closeFrame();
                   launchFrame(length);
              else if (e.getSource() == buttonGrid[a])
                   int setGridNew [][] = null;
                   setGridNew = new int[length][length];               
                   JButton bombButton [][] = null;
                   bombButton = new JButton [length][length];
                   String bombString [][] = null;
                   bombString = new String[length][length];
                   setGridNew = setGrid (length);               
                   for (int i = 0; i < length; i++)
                        for (int j = 0; j < length; j++)
                             bombString[i][j] = setBombs (length, setGridNew, i, j);
                             bombButton[i][j] = new JButton (bombString[i][j]);
                   if (setGridNew[a][b] == 0)
                        buttonGrid[a][b] = bombButton[a][b];
                        getBombsTotal--;
                        JLabel setBombsLabelNew = new JLabel();
                        setBombsLabelNew = setBombsLabel (" " String.valueOf (getBombsTotal) " Bombs Left");
                   else if (setGridNew[a][b] == 1 )
                        buttonGrid[a][b] = new JButton("x");
                        JOptionPane.showMessageDialog (null, "Game Over. You hit a Bomb!");
                        System.exit(0);     
         //create the content pane
         public Container newContentPane(int length)
              JPanel topPanel = new JPanel();
              JPanel bottomPanel = new JPanel();          
              topPanel = newTopPanel(length);
              bottomPanel = newBottomPanel (length);
              JPanel contentPane = new JPanel();
              contentPane.setOpaque (true);
              contentPane.setLayout (new BorderLayout(5,5));
              contentPane.add (topPanel, BorderLayout.NORTH);
              contentPane.add (bottomPanel, BorderLayout.CENTER);
              return contentPane;
         public void closeFrame ()
              frame = new JFrame ("Minesweeper");
              frame.dispose();
         public void launchFrame (int length)
              //Makes sure we have nice window decorations
              JFrame.setDefaultLookAndFeelDecorated(true);          
              //Sets up the top-level window     
              frame = new JFrame ("Minesweeper");
              //Exits program when the closed button is clicked
              frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);
              JMenuBar menuBar = new JMenuBar();
              Container contentPane = new Container();
              menuBar = newMenuBar();
              contentPane = newContentPane (length);
              //Sets up the menu bar and content pane
              frame.setJMenuBar (menuBar);
              frame.setContentPane (contentPane);
              //Displays the window
              frame.pack();
              frame.setVisible (true);
         public static void main (String args[])
              //Default length is 5
              length = 5;
              MinesweeperGUI minesweeper = new MinesweeperGUI();
              minesweeper.launchFrame(length);

  • Capturing  through Sony HDV using firewire800 to 400 adaptor is not recognizing can any body help me solve this

    I am trying to capture using firewire 800 to 400 adaptor through a Sony HDV VTR. The VTR is not recognizing can some body help me solve this problem.
    I am using FCP7 and IMAC with 10.6.8 version os
    I dont have a 6 pin or 400 firewire port in the system

    Let's start with basics.
    Does your computer recognize that there is a VTR attached?
    • Open up system profiler>Hardware>FireWire.  Does your machine show up?
    If no, you need to figure out if the problem lies with the VTR, the cable, the adapter or your computer.
    My guess is with the adapter. A number of people have expressed frustration getting fw400 device to work through fw800 ports.
    If that's your problem, see if you can find an older Mac w/ fw400 ports or a dedicated fw800 to 400 cable.
    good luck,
    x
    ps - In "locking the barn after the paddle has been lost upstream" mode, this is why non-expandable computers like the iMac are so problematic. A MacBookPro with the expresscard 34 slot or a MacPro with 3 slots can work around these kind of issues. A closed box like the iMac is a dead end. Sorry.

  • I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    I updated my Iphone 4s to IOS 7, now it reboots after every 2 minutes, I tried to restore, but the reboot gets it disconnected from PC, help me solve this reboot issue..

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...
    Be sure to Follow ALL the Steps...
    But... if the Device has been Modified... this will Not necessarily work.

  • My Numbers file sent to somebody is not able to open in Excel can anybody help to solve this problem?

    my Numbers file sent to somebody. He is not able to open in Excel can anybody help to solve this problem?

    Numbers files are not compatible with MS Excel.  To share a Numbers file with Excel you need to export you Numbers file in MS Excel format.  To do this:
    1) Open you Numbers document
    2) select the menu item "File > Export..."
    3) select "Excel" for the target output
    4) click next and select where to save the file.
    5) email the file you saved

  • TS1292 i have a spanish gift card that won't work with my canadian account. can someone help me solve this

    i found an old gift card that i got with my ipod from spain
    i have a canadian account. when i tried using the gift card it said i couldn't use the spanish gift card with my canadian account. can someone help me solve this problem
    the gift card is 15 euros

    Sorry, but you cannot use that card with a Canadian iTunes Store account. A gift card is valid only in the country of purchase. You'll need to give or sell that card to someone in Spain.
    Regards.

  • Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer.  I would gratefully appreciate any help in solving this,

    Used Migration Assistant to successfully transfer PC files to Mini. However file creation or modified date does not transfer. Date of creation is listed as day of transfer.  I would gratefully appreciate any help in solving this?

    I have the same problem; used Migration Assistant to transfer all my pix from PC to MacbookPro, however dates of pix were not transferred. Date created as the date of transfer. Cannot sort my pix according to date.
    Anybody has an answer?

  • HT1349 The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home  on my wi Fi is the only t

    The nice man Joseph Shen helped me with my google problem on my iPhone and worked for 2 days and now not working again please help me solve this problem were I can retrieve my messages on the I phone when I am not at home  on my wi Fi is the only time it works correct. Bill. [email protected]  708 752  3667 

    http://lifehacker.com/5852948/what-to-do-if-youve-forgotten-your-iphones-passcod e

  • I am unable to sync my Ipod Nano (4th generation I believe) because my computer does not recognize my device.  Can anyone help me solve this problem?

    I am unable to sync my Ipod Nano (4th generation I believe) because my computer does not recognize my device.  Can anyone help me solve this problem?

    Reset the AMDS >  How to restart the Apple Mobile Device Service (AMDS) on Windows

Maybe you are looking for

  • For Loop in OSB(ALSB)

    I have a variable in alsb: $destinations = <destinations> <destination>      <DESCRIPTION>      URL1      </DESCRIPTION> </destination> <destination>      <DESCRIPTION>      URL2      </DESCRIPTION> </destination> </destinations> I have for each loop

  • Import Iphone contact to macbook pro Agenda

    Hi... I recently bought an Iphone 3G... I've already imported my SIM contacts to the phone... im my computer's agenda, i have just a few phone contacts... i would like to know if there is a way of importing my iphone contacts to my computer... instea

  • Is SAP Certication only allowed for ppl taken training from selected center

    Hi Experts Just wanted to know that : If someone who has taken SAP training from any local institute is elligible for SAP certification? Is there any prerequisite for Certification , which states that u should be trained from some specific institues.

  • How to define the DATE fields in itab for uploading the data?

    Hi Experts, Am uploading the data from Excel sheet to Z table via my_itab. So, there r 3 Date fields in Z table, which are defined as DATS(8). So, pls. let me know that, How I hv to define the itab-date_one, itab-date_second, itab-date_three, weather

  • Graphics that appear when hovering over menu buttons

    Hello, I use to create menus in DVDSP 1 that would allow me to associate a picture with menu text. I would like to do that now, and have the picture show up when the button is either hovered over or selected. This would be in addition to the text cha