Noob Compiling Problem

public void update (Graphics g) {

Dimension d = getSize();

if ((offGraphics ==null)

***(d.width ! = offDimension.width)

(d.height ! = offDimension.height)) {

offDimension = d;

offImage = createImage(d.width, d.height);

offGraphics = offImage.getGraphics();

}

offGraphics.setColor(getBackground());

offGraphics.fillRect(0, 0, d.width, d.height);

offGraphics.setColor(Color .black);

paintFrame(offGraphics);

g.drawImage(offImage, 0, 0, null);

}

was trying to compile this code with the textpad but failed said that ")" expected on the *** line but i 've no idea where to fill ")" in . thx for help

[701 byte] By [Geoffreya] at [2007-10-2 6:57:11]
# 1

if ((offGraphics ==null)

*** (d.width ! = offDimension.width)

(d.height ! = offDimension.height)) {

Did you forget your OR (||) or AND (&&)?

if ((offGraphics ==null) ||

(d.width ! = offDimension.width) ||

(d.height ! = offDimension.height)) {

binhexa at 2007-7-16 20:25:39 > top of Java-index,Developer Tools,Java Compiler...
# 2

public void update (Graphics g) {

Dimension d = getSize();

if ((offGraphics ==null)

| |(d.width ! = offDimension.width)

| |(d.height ! = offDimension.height)) {

offDimension = d;

offImage = createImage(d.width, d.height);

offGraphics = offImage.getGraphics();

}

it said illegal start of expression now =.=

thx for ur answer anyway.. appreciate

Geoffreya at 2007-7-16 20:25:39 > top of Java-index,Developer Tools,Java Compiler...