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


Groups > comp.lang.java.gui > #2984 > unrolled thread

Trying to put a backgroun

Started by"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
First post2011-04-27 15:42 +0000
Last post2011-04-27 15:42 +0000
Articles 13 — 4 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Trying to put a backgroun "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
    Re: Trying to put a backg "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
      Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
      Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
        Re: Trying to put a backg "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
          Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
            Re: Trying to put a backg "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
              Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
                Re: Trying to put a backg "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
                  Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
                    Re: Trying to put a backg "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
                      Re: Trying to put a backg "Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000
                        Re: Trying to put a backg "Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this> - 2011-04-27 15:42 +0000

#2984 — Trying to put a backgroun

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectTrying to put a backgroun
Message-ID<2KGdncI4_4zyZhjanZ2dnUVZ8sqjnZ2d@novis.pt>
  To: comp.lang.java.gui
Trying to put a background image in a JFrame

I have looked this issue up and found that extending JPanel and
specifying a paintComponent() is one possibility. I haven't tried this
yet (and a different task popped up for today).

However, I thought that using the JFrames JRootPane or JLayeredPane
could be less a hassle. Well, it's not really, but I'm curious if this
could be solved. 

Get the whole NetBeans project with a compiled jar (49kB zip file) here
[1]. Please don't use the image for yourself, or my boss will kill me.

What happens is that the image (with transparent areas) is painted
infront of components instead of behind. Actually, when I first start
the application, the image is infront of one button and behind the
other. Moving the mouse over a button brings it to front, resizing the
window will put all components behind the image.

By the way, in the final project, the window will not be resizable,
although I would appreciate some hint towards catering for the image
being anchored to the lower right corner aswell.


[1] http://www.op3racional.eu/x/LayerTest.zip
-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#2985 — Re: Trying to put a backg

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<7dff8a0ce430d@uwe>
In reply to#2984
  To: comp.lang.java.gui
Sabine Dinis Blochberger wrote:
>Trying to put a background image in a JFrame
>
>I have looked this issue up and found that extending JPanel and
>specifying a paintComponent() is one possibility. I haven't tried this
>yet (and a different task popped up for today).

I would recommend you try it, rather than..

>However, I thought that using the JFrames JRootPane or JLayeredPane
>could be less a hassle. 

.'hack' JRootPane or JLayeredPane to achieve the (short 
term) visual effect.

>..Well, it's not really, but I'm curious if this
>could be solved. 

Possibly, but I doubt it could be done with more 
efficiency (expediency, or reusability) in the two
components mentioned.

>Get the whole NetBeans project with a compiled jar (49kB zip file) here
>[1]. Please don't use the image for yourself, or my boss will kill me.

You can alway supply a 'bogus'  (white BG with a red 'X' 
crossing it) image for these test cases. In some (rare) 
instances, I have even 'hot linked' to Sun's* own images.

* Example search..
<http://images.google.com/images?q=+site:java.sun.com+filetype:gif&as_st=y&svnum=10&um=1&hl=en&sa=G&imgsz=icon
>

>What happens is that the image (with transparent areas) is painted
>infront of components instead of behind. 

The transparency whould be transparent, barring the root 
component being set to be 'opaque' (transparent=false).

>..Actually, when I first start
>the application, the image is infront of one button and behind the
>other. Moving the mouse over a button brings it to front, resizing the
>window will put all components behind the image.

Have you called validate()/pack()?  Or is this GUI relying on
'pure luck'?

>By the way, in the final project, the window will not be resizable,
>although I would appreciate some hint towards catering for the image
>being anchored to the lower right corner aswell.

Put it in an appropriate layout(s).  A BorderLayout.WEST*, 
for the component, itself in a JPanel that is placed in the 
BorderLayout.SOUTH of an 'outer' panel, should achieve the 
'lower left' constraint.

* Assuming 'WEST' is left.  I always forget.

-- 
Andrew Thompson
http://www.physci.org/

Message posted via http://www.javakb.com

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2986 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<G-udnXOpCtPZlhvanZ2dnUVZ8tignZ2d@novis.pt>
In reply to#2985
  To: comp.lang.java.gui
Andrew Thompson wrote:

> Sabine Dinis Blochberger wrote:
> >Trying to put a background image in a JFrame
> >
> >I have looked this issue up and found that extending JPanel and
> >specifying a paintComponent() is one possibility. I haven't tried this
> >yet (and a different task popped up for today).
> 
> I would recommend you try it, rather than..
> 
> >However, I thought that using the JFrames JRootPane or JLayeredPane
> >could be less a hassle. 
> 
> ..'hack' JRootPane or JLayeredPane to achieve the (short 
> term) visual effect.
> 

Allright, it's on the TODO list <g>.

> >..Well, it's not really, but I'm curious if this
> >could be solved. 
> 
> Possibly, but I doubt it could be done with more 
> efficiency (expediency, or reusability) in the two
> components mentioned.
> 
Right.

> >Get the whole NetBeans project with a compiled jar (49kB zip file) here
> >[1]. Please don't use the image for yourself, or my boss will kill me.
> 
> You can alway supply a 'bogus'  (white BG with a red 'X' 
> crossing it) image for these test cases. In some (rare) 
> instances, I have even 'hot linked' to Sun's* own images.
> 
> * Example search..
> <http://images.google.com/images?q=+site:java.sun.com+filetype:gif&as_st=y&svnum=10&um=1&hl=en&sa=G&imgsz=icon
> >
> 
Yeah, I was thinking something along those lines, oh well. Noted for
future cases though, so thanks.

> >What happens is that the image (with transparent areas) is painted
> >infront of components instead of behind. 
> 
> The transparency whould be transparent, barring the root 
> component being set to be 'opaque' (transparent=false).
> 
The transparency is fine.

> >..Actually, when I first start
> >the application, the image is infront of one button and behind the
> >other. Moving the mouse over a button brings it to front, resizing the
> >window will put all components behind the image.
> 
> Have you called validate()/pack()?  Or is this GUI relying on
> 'pure luck'?
> 
Hum, good catch. Although the production project uses pack(), the test
application does not, yet the effect is the same.

> >By the way, in the final project, the window will not be resizable,
> >although I would appreciate some hint towards catering for the image
> >being anchored to the lower right corner aswell.
> 
> Put it in an appropriate layout(s).  A BorderLayout.WEST*, 
> for the component, itself in a JPanel that is placed in the 
> BorderLayout.SOUTH of an 'outer' panel, should achieve the 
> 'lower left' constraint.
> 
> * Assuming 'WEST' is left.  I always forget.
> 

   N
W     E
   S

I memorize it by remembering it says "we" (or "wo" in german) ;)

Thanks for your elaboration. I guess I should've just went with the
JPanel solution right away. No need to reinvent that wheel.

-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2988 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<XZWdnS5y-s_lyhranZ2dnUVZ8uSdnZ2d@novis.pt>
In reply to#2985
  To: comp.lang.java.gui
Andrew Thompson wrote:

> Sabine Dinis Blochberger wrote:
> >Trying to put a background image in a JFrame
> >
> >I have looked this issue up and found that extending JPanel and
> >specifying a paintComponent() is one possibility. I haven't tried this
> >yet (and a different task popped up for today).
> 
> I would recommend you try it, rather than..
> 
> >However, I thought that using the JFrames JRootPane or JLayeredPane
> >could be less a hassle. 
> 
> ..'hack' JRootPane or JLayeredPane to achieve the (short 
> term) visual effect.
> 
I have now implemented the JPanel route, but I'm still getting
headaches. Redownload (anyone interested) the zip for the two ways I
tried [1]. 

In option one, simply adding the extended JPanel to the contentpane does
display the image, but not in the position within the JFrame I want - it
does seem to put the image in the right spot in the BackgroundPanel.

I have let this JFrame with resizable=true, so you can see the panel in
this case is slightly too large. In the production code it's too small
(because pack() makes the window wider, and I don't know if or how I can
access the BackgroundPanel in the ComponentListerner componentResized).

In option two, adding one JPanel with BorderLayout.EAST, the other with
BorderLayout.SOUTH, all I get is a tiny square off the window bounds. It
becomes visible by resizing (it's to the bottom right).

To reiterate, I want the background image/panel to be anchored to the
lower right corner of the JFrame.

[1] <http://www.op3racional.eu/x/LayerTest.zip> (31kB)

Thanks to anyone taking a look at this :)
-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2989 — Re: Trying to put a backg

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<7e0c42d4def4d@uwe>
In reply to#2988
  To: comp.lang.java.gui
Sabine Dinis Blochberger wrote:
>> >Trying to put a background image in a JFrame
..
>In option two, adding one JPanel with BorderLayout.EAST, the other with
>BorderLayout.SOUTH, all I get is a tiny square off the window bounds. 

Images load asynchonously, so maybe the image
is returning a -1,-1 size at time of pack().  One way
to fix that is to use a MediaTracker.  Knute has some
good examples of loading and displaying images, here..
<http://rabbitbrush.frazmtn.com/>

-- 
Andrew Thompson
http://www.physci.org/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-gui/200801/1

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2990 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<A62dndYPCPJE-RranZ2dnUVZ8rGdnZ2d@novis.pt>
In reply to#2989
  To: comp.lang.java.gui
Andrew Thompson wrote:

> Sabine Dinis Blochberger wrote:
> >> >Trying to put a background image in a JFrame
> ...
> >In option two, adding one JPanel with BorderLayout.EAST, the other with
> >BorderLayout.SOUTH, all I get is a tiny square off the window bounds. 
> 
> Images load asynchonously, so maybe the image
> is returning a -1,-1 size at time of pack().  One way
> to fix that is to use a MediaTracker.  Knute has some
> good examples of loading and displaying images, here..
> <http://rabbitbrush.frazmtn.com/>
> 
> 
The new contructor thus looks like this

//---
      public BackgroundPanel(String imgName) {
        try {
            image = createImageIcon(imgName);
            
            // Create a MediaTracker instance,
            // to montior loading of images
            final MediaTracker tracker = new MediaTracker(this);

            // Register it with media tracker
            tracker.addImage(image.getImage(), 1);
            // Wait until all images have loaded
            tracker.waitForAll();
        } catch (Exception ex) { ex.printStackTrace(); }
      }
//---

It didn't make a difference. The square is a few pixels large, you can
actually see part of the image on it - it's "only" cropped.

Then I tried to change the contentPanes layout, and it actually anchors
the panel as I want:
//---
    private void addSimply() {
        final JPanel bgPanel = new BackgroundPanel("background.png"); 
        bgPanel.setOpaque(false);
        
        final Container cp = getContentPane();
        cp.setLayout(new BorderLayout());
        cp.add(bgPanel, BorderLayout.EAST);
        bgPanel.setBounds(0, 0, getWidth(), getHeight());
    }
//---

However, the BackgroundPanel is now only a few pixels wide, and button 3
is not anchored to the right window edge anymore (I can live without
that though)...

-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#2992 — Re: Trying to put a backg

From"Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<4787b593$0$27818$b9f67a60@news.newsdemon.com>
In reply to#2990
  To: comp.lang.java.gui
Sabine Dinis Blochberger wrote:
> Andrew Thompson wrote:
> 
>> Sabine Dinis Blochberger wrote:
>>>>> Trying to put a background image in a JFrame
>> ...
>>> In option two, adding one JPanel with BorderLayout.EAST, the other with
>>> BorderLayout.SOUTH, all I get is a tiny square off the window bounds. 
>> Images load asynchonously, so maybe the image
>> is returning a -1,-1 size at time of pack().  One way
>> to fix that is to use a MediaTracker.  Knute has some
>> good examples of loading and displaying images, here..
>> <http://rabbitbrush.frazmtn.com/>
>>
>>
> The new contructor thus looks like this
> 
> //---
>       public BackgroundPanel(String imgName) {
>         try {
>             image = createImageIcon(imgName);
>             
>             // Create a MediaTracker instance,
>             // to montior loading of images
>             final MediaTracker tracker = new MediaTracker(this);
> 
>             // Register it with media tracker
>             tracker.addImage(image.getImage(), 1);
>             // Wait until all images have loaded
>             tracker.waitForAll();
>         } catch (Exception ex) { ex.printStackTrace(); }
>       }
> //---
> 
> It didn't make a difference. The square is a few pixels large, you can
> actually see part of the image on it - it's "only" cropped.
> 
> Then I tried to change the contentPanes layout, and it actually anchors
> the panel as I want:
> //---
>     private void addSimply() {
>         final JPanel bgPanel = new BackgroundPanel("background.png"); 
>         bgPanel.setOpaque(false);
>         
>         final Container cp = getContentPane();
>         cp.setLayout(new BorderLayout());
>         cp.add(bgPanel, BorderLayout.EAST);
>         bgPanel.setBounds(0, 0, getWidth(), getHeight());
>     }
> //---
> 
> However, the BackgroundPanel is now only a few pixels wide, and button 3
> is not anchored to the right window edge anymore (I can live without
> that though)...
> 

Sabine:

I think I know what you want here.  You want an image on the back of the 
frame that will be drawn anchored to the lower right corner of that 
frame.  You want your components in front of that image.  If I've got 
that wrong you can ignore the rest of this.

What you need to do is to create a JPanel and set that as the frame's 
ContentPane.  That JPanel has the image drawn in the lower right corner. 
  Then just add your components to the JFrame as usual.

import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import java.io.*;
import javax.imageio.*;
import javax.swing.*;

public class test7 extends JPanel {
     final BufferedImage bi;

     public test7() throws IOException {
         bi = ImageIO.read(new File("kittens.jpg"));
     }

     public void paintComponent(Graphics g) {
         g.drawImage(bi,getWidth()-bi.getWidth(),
          getHeight()-bi.getHeight(),null);
     }

     public static void main(String[] args) {
         EventQueue.invokeLater(new Runnable() {
             public void run() {
                 try {
                     JFrame f = new JFrame();
                     f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                     f.setLayout(new GridBagLayout());
                     GridBagConstraints c = new GridBagConstraints();
                     test7 t7 = new test7();
                     f.setContentPane(t7);
                     f.add(new JButton("Button1"),c);
                     ++c.gridx;
                     f.add(new JLabel("Label1"),c);
                     f.setSize(400,300);
                     f.setVisible(true);
                 } catch (IOException ioe) {
                     ioe.printStackTrace();
                 }

             }
         });
     }
}

-- 

Knute Johnson
email s/nospam/knute/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
      ------->>>>>>http://www.NewsDem

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3019 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<HLqdnVX1EqCyrxbanZ2dnUVZ8rednZ2d@novis.pt>
In reply to#2992
  To: comp.lang.java.gui
Knute Johnson wrote:
> Sabine:
> 
> I think I know what you want here.  You want an image on the back of the 
> frame that will be drawn anchored to the lower right corner of that 
> frame.  You want your components in front of that image.  If I've got 
> that wrong you can ignore the rest of this.
> 
Yes, that's exactly right.

> What you need to do is to create a JPanel and set that as the frame's 
> ContentPane.  That JPanel has the image drawn in the lower right corner. 
>   Then just add your components to the JFrame as usual.

Eureka! The difference was between using getContentPane.add() and
setContentPane(). The call to setContentPane() has to be made before the
initComponents() call, if using NetBeans.

Thank you so much :)
-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3020 — Re: Trying to put a backg

From"Lew" <lew@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<G7mdnd96SOZ16RbanZ2dnUVZ_ufinZ2d@comcast.com>
In reply to#3019
  To: comp.lang.java.gui
Sabine Dinis Blochberger wrote:
> Eureka! The difference was between using getContentPane.add() and
> setContentPane(). The call to setContentPane() has to be made before the
> initComponents() call, if using NetBeans.

Why does using NetBeans matter?

Isn't Java Java?

-- 
Lew

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3022 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<1fOdnX0dZdGk4xHanZ2dnUVZ8vGdnZ2d@novis.pt>
In reply to#3020
  To: comp.lang.java.gui
Lew wrote:

> Sabine Dinis Blochberger wrote:
> > Eureka! The difference was between using getContentPane.add() and
> > setContentPane(). The call to setContentPane() has to be made before the
> > initComponents() call, if using NetBeans.
> 
> Why does using NetBeans matter?
> 
> Isn't Java Java?
> 
> 
It matters because NetBeans puts all the component initialization and
layout into a method called initComponents(), which *it* won't allow you
to edit in the source code - you can only through the properties editor.
NetBeans keeps separate "form" files, for the visual GUI editing I
suppose. 

Just a caveat for the accomodated (like me <g>) I suppose.

Not an issue if you use NetBeans but not it's "generators", or do
everything "by hand".
-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3023 — Re: Trying to put a backg

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<7011e823-ebda-4311-9e59-780186d68592@i7g2000prf.googlegroups.com>
In reply to#3022
  To: comp.lang.java.gui
On Jan 15, 8:34=A0pm, Sabine Dinis Blochberger <no.s...@here.invalid>
wrote:
> Lew wrote:
=2E..
> > Isn't Java Java?
>
> It matters because NetBeans ..

As an aside.  did you hear my teeth grinding
as I looked at your (OK "Netbean's") comments
advising me to 'not alter this code, since it
is generated by..' - like I should care.

I agree with (what I presume to be) the general
thrust of Lew's argument/question.

*Be* the programmer, do not allow yourself to be
caught by the 'short and curlies' by some damnable
piece of software.  Even if *Sun* makes it.

Has anybody linked to the Swing GUI tutorial
earlier in this thread?

--
Andrew T.
PhySci.org

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3024 — Re: Trying to put a backg

From"Sabine Dinis Blochberger" <sabine.dinis.blochberger@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<fYadncqUI5FIBhHanZ2dnUVZ8v2vnZ2d@novis.pt>
In reply to#3023
  To: comp.lang.java.gui
Andrew Thompson wrote:

> On Jan 15, 8:34 pm, Sabine Dinis Blochberger <no.s...@here.invalid>
> wrote:
> > Lew wrote:
> ...
> > > Isn't Java Java?
> >
> > It matters because NetBeans ..
> 
> As an aside.  did you hear my teeth grinding
> as I looked at your (OK "Netbean's") comments
> advising me to 'not alter this code, since it
> is generated by..' - like I should care.
> 
Quoth NetBeans:

   /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

yadda yadda yadda, you pay convenience with limitations ;)

You are not forced to care in regards to my problem. I take any crumbs
of wisdom gladly. Anyway I mentioned it as it matters to myself, later
someone would butt in saying "but you can't edit this, what the heck" or
whatever.

> I agree with (what I presume to be) the general
> thrust of Lew's argument/question.
> 
> *Be* the programmer, do not allow yourself to be
> caught by the 'short and curlies' by some damnable
> piece of software.  Even if *Sun* makes it.
> 

To me, "automatism" like this is the point in using an IDE. I'm moslty
aware (maybe, can't know what I don't know) of the implications and
limitations, but it hasn't posed a problem yet. I'm also aware that not
everyone will be happy with something like this. Uh, talk amongst
yourselves <g>.

> Has anybody linked to the Swing GUI tutorial
> earlier in this thread?
> 
I think not. However, I do reference Suns tutorial, if that's what you
meant.

-- 
Sabine Dinis Blochberger

Op3racional
www.op3racional.eu

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [next] | [standalone]


#3026 — Re: Trying to put a backg

From"Andrew Thompson" <andrew.thompson@THRWHITE.remove-dii-this>
Date2011-04-27 15:42 +0000
SubjectRe: Trying to put a backg
Message-ID<d96dd334-fdbe-4ddd-b578-9532458f2f9f@u10g2000prn.googlegroups.com>
In reply to#3024
  To: comp.lang.java.gui
On Jan 15, 10:41=A0pm, Sabine Dinis Blochberger <no.s...@here.invalid>
wrote:
>...I do reference Suns tutorial, if that's what you
> meant.

(shrugs) I'm not entirely sure what I meant,
(beyond having a general whine) but that
comment 'placates' me.

(As an aside, I think I just posted a completely
'information free' reply to this thread - my
apologies to everyone. )

--
Andrew T.
PhySci.org

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web