Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

Re: DALLAS DS75 help

Wed Jun 27, 2007 1:52 pm

I tried to do with Timer but it doesn't work :(



Re: DALLAS DS75 help

Wed Jun 27, 2007 1:55 pm

make a loop in a thread and change it every step of time.

Re: DALLAS DS75 help

Wed Jun 27, 2007 2:09 pm

I dont understand :confused:

for(i=0;i<=30;i=30-temparray.length()+1){
temparray[i%30] = ds75.getTemp();
}

what i need to add in this?

Re: DALLAS DS75 help

Wed Jun 27, 2007 2:17 pm

program code

Code:
import javax.swing.JFrame;

public class myFrame extends javax.swing.JFrame {

    public myFrame() {
        getContentPane().add(cpanel);
   setTitle("Temperature");
        setSize(600,450);
        setLocation(200,200);
   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
   setVisible(true);
    }

    public static void main(String args[]) {
        new myFrame();
        for(i=0;i<=30;i=30-temparray.length()+1){
           temparray[i%30] = ds75.getTemp();
        }
    }

    myPanel cpanel=new myPanel();
    DS75 ntmp = getTemp();
}


Post a reply