Skip to main content

Posts

Work!!!!

I think my code can be worked!!! Actuary, I felt scare that if my code cannot work from today.... This program work correct. But, sometime it made any strange work........ synchronize?? Memory full?? ......?????? I have to check more for it

Rectangle2D

When we want to use Rectangle2D.Double with RMI we will need Serializable Rectangle2D.Double. Rectangle2D is serialized by sun. <------- java.awt.Rectangle But java.awt.Rectangle is supported just for Integer Version. So, I made SerializableRectangle2D like as following code. public class SerializableRectangle2D extends Rectangle2D.Double implements Serializable { public SerializableRectangle2D() { super(); } public SerializableRectangle2D(double x, double y, double w, double h) { super(x, y, w, h); } } However the getting value is just 0 when I use rmi and get message. But, no documents was google in japanse.... I lose 3 days....... Some of web site said i cannot do it using easy way.... And some of site said java 1.6 will be able to be suported it. This meaning.......it will be able to use serialized Rectangle2D.Double....... Actuary........I have no way how to make solution for this problem......

Memo: java.awt.geom

When I want to check intersect between 2 square, I use java.awt.geom. ============================================= Rectangle2D r1 = new Rectangle2D.Double(x, y, width, height); Rectangle2D r2 = new Rectangle2D.Double(x, y, width, height); Rectangle2D diff = r1.createIntersection(r2); ============================================= But, when between r2 and r1 has no intersect then this class make strange shape..... I will check why this class out put like as this.

RERROR

Today, I taught my codeing for new class. However, after my writing there java bumped more than 50 error. And there are not my new writing area. ToT

Memo

When I get to my room I have to separate intercept checking function from request manager. Then I will be able to unionize intercept checker.

Memo

I changed VW from ArrayList to HashMap then the code began to more simple. And, using java 5.0 made also code simple. But, 5.0 make more difficult to understand than before version or others language like as C.

Memo: null checking for String data

When I write following thing Java compiler out put errer. ====================== String s; ************* if(s == null) { *********** } ======================= and ====================== String s; ************* if(s.compareTo(null) == 0) { *********** } ====================== But, actuary I have to do following thing. ====================== String s = null; ************* if(s == null) { *********** } =======================