PDA

View Full Version : How do you create a box data type in java?



rj
08-30-2013, 01:06 AM
How do you create a box data type in java? -.-

It's like impossible to google because every website is talking about a Jbox or something to do with the GUI

KingKong
08-30-2013, 08:31 AM
you mean a c type structure or simba record like TBox? If so you have to make a class with 4 member variables as everything in java must be in a class. So like this:


public class TBox{
int X1;
int X2;
int Y1;
int Y2;
}

rj
08-30-2013, 07:05 PM
you mean a c type structure or simba record like TBox? If so you have to make a class with 4 member variables as everything in java must be in a class. So like this:


public class TBox{
int X1;
int X2;
int Y1;
int Y2;
}


thanks