Skip to main content



      Home
Home » Archived » Visual Editor (VE) » Pb with this keyword.
Pb with this keyword. [message #16399] Thu, 22 January 2004 10:09 Go to next message
Eclipse UserFriend
Originally posted by: thierry.doucet.fr.ibm.com

Hello,

I just found a startling thing with VE.
using this code :

import javax.swing.JPanel;

/**
* @author Thierry Doucet
*/
public class VETest extends JPanel {

private javax.swing.JLabel jLabel = null;

/**
* This method initializes
*/
public VETest() {
super();
initialize();
}

/**
* This method initializes this
*/
private void initialize() {
this.add(getJLabel(), null);
}

/**
* This method initializes jLabel
*/
private javax.swing.JLabel getJLabel() {
if(jLabel == null) {
jLabel = new javax.swing.JLabel();
jLabel.setText("Test Label");
}
return jLabel;
}
}

if you put 'this' keyword before using jLabel attribute in getJLabel
method, it seemS VE can'T render correctly the panel.
especially on line:

- "this.jLabel = new javax.swing.JLabel();" : jLabel didn't appear.
- "this.jLabel.setText("Test Label");" : jLabel isn't put in the panel and
jLabel text didn't appear
- "return this.jLabel" or "if(this.jLabel == null) {": jLabel isn't put in
the panel

Thank you for your help

Thierry
Re: Pb with this keyword. [message #16484 is a reply to message #16399] Thu, 22 January 2004 16:35 Go to previous message
Eclipse UserFriend
Hi Thierry,

Thanks for finding this - I've created a bugzila
https://bugs.eclipse.org/bugs/show_bug.cgi?id=50430

Best regards,

Joe Winchester
Re: Pb with this keyword. [message #579174 is a reply to message #16399] Thu, 22 January 2004 16:35 Go to previous message
Eclipse UserFriend
Hi Thierry,

Thanks for finding this - I've created a bugzila
https://bugs.eclipse.org/bugs/show_bug.cgi?id=50430

Best regards,

Joe Winchester
Previous Topic:Visual Model Wizard
Next Topic:Displaying a JPanel sublass in VE
Goto Forum:
  


Current Time: Thu Mar 13 12:53:47 EDT 2025

Powered by FUDForum. Page generated in 0.03133 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top