Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #22289

Re: Converting Text File To Rectangles

From Roedy Green <see_website@mindprod.com.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Converting Text File To Rectangles
Date 2013-02-12 18:23 -0800
Organization Canadian Mind Products
Message-ID <sutlh89ohk1tbbjrvud7tkrt4m0cdbbelh@4ax.com> (permalink)
References <7f49c487-f016-43a3-83a4-feebe072f76c@googlegroups.com> <j62dnbkquNlNkofMnZ2dnUVZ8n2dnZ2d@bt.com>

Show all headers | View raw


On Tue, 12 Feb 2013 09:47:58 +0000, lipska the kat <"nospam at
neversurrender dot co dot uk"> wrote, quoted or indirectly quoted
someone who said :

>class RectData {
>
>	Integer x, y, width, height;
>
>	RectData(Integer x, Integer y, Integer width, Integer height) {
>		this.x = x;
>		this.y = y;
>		this.width = width;
>		this.height = height;
>	}

There is already a built in class like this called Rectangle

You want int not Integer parms.

see http://mindprod.com/jgloss/intvsinteger.html

You could have an array or ArrayList of Rectangles and in you paint
method, you render them either as outlines or filled
-- 
Roedy Green Canadian Mind Products http://mindprod.com
The first 90% of the code accounts for the first 90% of the development time.
The remaining 10% of the code accounts for the other 90% of the development 
time. 
~ Tom Cargill  Ninety-ninety Law 

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Converting Text File To Rectangles Scyth3 <zfollette@gmail.com> - 2013-02-11 17:51 -0800
  Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-11 21:02 -0500
    Re: Converting Text File To Rectangles Gene Wirchenko <genew@telus.net> - 2013-02-13 09:06 -0800
      Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-13 13:25 -0500
        Re: Converting Text File To Rectangles "Chris Uppal" <chris.uppal@metagnostic.REMOVE-THIS.org> - 2013-02-15 15:25 +0000
          Re: Converting Text File To Rectangles "John B. Matthews" <nospam@nospam.invalid> - 2013-02-16 13:37 -0500
            [OT] Re: Converting Text File To Rectangles Eric Sosman <esosman@comcast-dot-net.invalid> - 2013-02-16 15:16 -0500
              Re: [OT] Re: Converting Text File To Rectangles "John B. Matthews" <nospam@nospam.invalid> - 2013-02-17 14:16 -0500
        Re: Converting Text File To Rectangles Gene Wirchenko <genew@telus.net> - 2013-02-15 13:09 -0800
  Re: Converting Text File To Rectangles Arved Sandstrom <asandstrom2@eastlink.ca> - 2013-02-12 04:47 -0400
    Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 12:14 +0000
  Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 09:47 +0000
    Re: Converting Text File To Rectangles lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-02-12 09:50 +0000
    Re: Converting Text File To Rectangles Roedy Green <see_website@mindprod.com.invalid> - 2013-02-12 18:23 -0800
  Re: Converting Text File To Rectangles Roedy Green <see_website@mindprod.com.invalid> - 2013-02-12 11:41 -0800

csiph-web