Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > getContentPane problem

Reply
Thread Tools

getContentPane problem

 
 
DaveForgotHisEngineering
Guest
Posts: n/a
 
      03-04-2008
Hi. Thanks in advance for any assistance you can provide. Why isn't
netBeans able to resolve the method getContentPane in the following
line of code: c = getContentPane();


import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.math.*;
import java.util.*;
import java.io.*;
import java.lang.*;

public class ScubaFormulaApplet extends java.applet.Applet implements
ActionListener {
private javax.swing.JPanel jPanel2;
private javax.swing.JLabel jLabel2;
private javax.swing.JTextField jTextField1;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField2;
private javax.swing.JLabel jLabel4;
private javax.swing.JTextField jTextField3;
private javax.swing.JLabel jLabel5;
private javax.swing.JTextField jTextField4;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JTextArea resultArea;
private java.awt.Container c;


/** Initialization method that will be called after the applet is
loaded
* into the browser.
*/
public void init() {
initComponents();
setSize(400, 100);
}

private void initComponents() {
c = getContentPane();

c.setLayout( new BorderLayout() );
.................................................. ........................
 
Reply With Quote
 
 
 
 
Knute Johnson
Guest
Posts: n/a
 
      03-04-2008
DaveForgotHisEngineering wrote:
> Hi. Thanks in advance for any assistance you can provide. Why isn't
> netBeans able to resolve the method getContentPane in the following
> line of code: c = getContentPane();


Because Applets don't have the method getContentPane().

--

Knute Johnson
email s/nospam/knute/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
 
Reply With Quote
 
 
 
 
DaveForgotHisEngineering
Guest
Posts: n/a
 
      03-04-2008
Thanks!

On Mar 3, 11:16*pm, Knute Johnson <(E-Mail Removed)>
wrote:
> DaveForgotHisEngineering wrote:
> > Hi. *Thanks in advance for any assistance you can provide. *Why isn't
> > netBeans able to resolve the method getContentPane in the following
> > line of code: c = getContentPane();

>
> Because Applets don't have the method getContentPane().
>
> --
>
> Knute Johnson
> email s/nospam/knute/
>
> --
> Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
> * * * ------->>>>>>http://www.NewsDemon.com<<<<<<------
> Unlimited Access, Anonymous Accounts, Uncensored Broadband Access


 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      03-05-2008
On Mon, 3 Mar 2008 20:42:09 -0800 (PST), DaveForgotHisEngineering
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

> c = getContentPane();


That's because there is no Applet.getContentPane.

Perhaps you meant JApplet.getContentPane.

Don't mix AWT and Swing components.
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find getContentPane() in Frame Gil Java 9 01-27-2005 05:00 PM
Problem problem problem :( Need Help Mike ASP General 2 05-11-2004 08:36 AM
Help with getContentPane() RCS Java 3 09-08-2003 03:23 AM



Advertisments