🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #13206

Re: Sample Swing apps don't work when running in JBuilder, please help!!!

#13206
From: Dave Brown
Date: Wed, 02 Sep 1998 00:00
71 lines
3081 bytes
For SwingSet that's what I have. Here's where it locks up. I've tried it 
on three different machines.

  /**
     * Paints the matte border.
     */
    public void paintBorder(Component c, Graphics g, int x, int y, int 
width, int height) {
        Insets insets = getBorderInsets(c);
        Color oldColor = g.getColor();
        g.translate(x, y);

        if (color != null) {
            g.setColor(color);
            g.fillRect(0, 0, width - insets.right, insets.top);
            g.fillRect(0, insets.top, insets.left, height - insets.top);
            g.fillRect(insets.left, height - insets.bottom, width - 
insets.left, insets.bottom);
            g.fillRect(width - insets.right, 0, insets.right, height - 
insets.bottom);

        } else if (tileIcon != null) {

            int tileW = tileIcon.getIconWidth();
            int tileH = tileIcon.getIconHeight();
            int xpos, ypos, startx, starty;
            Graphics cg;

            // Paint top matte edge
            cg = g.create();
            cg.setClip(0, 0, width, insets.top);
            for (ypos = 0; insets.top - ypos > 0; ypos += tileH) {

*************** It's caught in thr elop below ******************8
                for (xpos = 0; width - xpos > 0; xpos += tileW) {
                    tileIcon.paintIcon(c, cg, xpos, ypos);
                }
       

Dave

In article <35ED930E.8DC8C98C@bilbo.bio.purdue.edu>, 
pf@bilbo.bio.purdue.edu says...
> Dave Brown wrote:
> > 
> > Ok, I have tried to run the StylePad and SwingSet examples within
> > JBuilder and neither work in the environment. If I attempt to run the
> > same samples using java.exe at the command line they work fine.
> 
> Taking StylePad as an example, create a new project in
> the StylePad folder.  In "Project Properties", set
> the source root folders correctly (that includes the 
> path to NotePad.java).  Add the property files to 
> the project.  Finally, copy the "images" folder
> into the class output folder. [Since the number of 
> class files is small, you could simply name the project
> folder as the class output folder and not have to make
> a copy of the image folder.]
> 
> For SwingSet, create a project in the SwingSet folder.
> Set the source root folder to the SwingSet folder.
> Add all the .java files into the project (probably
> not necessary, but that provides quicker access to
> them).  Set the default runnable file to SwingSet.java.
> 
> 
> That should do it.
> 
> 
> Paul Furbacher
> 
Technical Details
Message-ID: <MPG.10574261af50871d989686@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <MPG.105622def64e7d76989685@forums.borland.com> <35ED930E.8DC8C98C@bilbo.bio.purdue.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,87f83eb946a8f1cb
X-Google-Attributes: gid111d45,public
From: dave_brown@dw-tech.com (Dave Brown)
Subject: Re: Sample Swing apps don't work when running in JBuilder, please help!!!
Date: 1998/09/02
Message-ID: <MPG.10574261af50871d989686@forums.borland.com>
X-Deja-AN: 387219283
References: <MPG.105622def64e7d76989685@forums.borland.com> <35ED930E.8DC8C98C@bilbo.bio.purdue.edu>
Organization: DW Technologies
Newsgroups: borland.public.jbuilder.java.swing