🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1482

Question about JPanel and windows...

#1482
From: Joseph Konstantourakis
Date: Mon, 24 Dec 2001 23:56
20 lines
2169 bytes
First of all, I am  new in Java (in OO programming), so
if my question sounds funny, forgive me.

  I have created a JFrame, and after that a JPanel. I want the panel, to
draw certain 2D shapes on it, with tools(classes) I've created
myself. That, I made it.
  The problem is that I must create a class like this one:
SetWindow(Graphics2D mygraph,int Xleft,int Xright,int Ybottom,int Ytop).
What this class is supposed to do, is creating a rectangle area -defined by
these 4 int coordinates-. Everything that is drawn inside this area, will be
visible. Everything outside it, not. I figured out that what must be done
is, cutting the outside area in 4 pieces and applying a certain class(?) in
each one of them, to stop them from drawing. Am I right? And what is this
?class?? If I am wrong, is there any other way to do it?
  I use JBuilder5 Personal, and didn't make it to find anything in the 57MB
Help file I downloaded. Any help will be really appreciated, since I am new
to this (but I think is much better than C++ !)

Joseph
josephxx@otenet.gr
Technical Details
Message-ID: <a08fc8$eh0$1@usenet.otenet.gr>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.otenet.gr!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,829b4b09c808b7e6,start
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-12-24 15:56:58 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.otenet.gr!not-for-mail
From: "Joseph Konstantourakis" <josephxx@otenet.gr>
Newsgroups: borland.public.jbuilder.java.api
Subject: Question about JPanel and windows...
Date: Tue, 25 Dec 2001 01:56:52 +0200
Organization: An OTEnet S.A. customer
Lines: 24
Message-ID: <a08fc8$eh0$1@usenet.otenet.gr>
Reply-To: "Joseph Konstantourakis" <josephxx@otenet.gr>
NNTP-Posting-Host: agni364-a082.otenet.gr
X-Trace: usenet.otenet.gr 1009238217 14880 195.167.121.83 (24 Dec 2001 23:56:57 GMT)
X-Complaints-To: abuse@otenet.gr
NNTP-Posting-Date: Mon, 24 Dec 2001 23:56:57 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000