Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Package Scope
Package Scope [message #611550] Wed, 14 December 2005 23:16
Jeff is currently offline JeffFriend
Messages: 21
Registered: July 2009
Junior Member
I'm having a problem with the visual editor with package scope.

I created a visual class that overrides JPanel called InnerPanel like this:
package testve;

import java.awt.LayoutManager;

import javax.swing.JPanel;
import javax.swing.JButton;

class InnerPanel extends JPanel {

Which is a package scope class inside of the testve package.

I then created another visual class called MainWindow that overrides JFrame which has a main method that creates itself like this:
package testve;

import java.awt.BorderLayout;
import javax.swing.JPanel;
import java.awt.GraphicsConfiguration;
import java.awt.HeadlessException;

import javax.swing.JFrame;

class MainWindow extends JFrame {

private JPanel jContentPane = null;
private InnerPanel innerPanel = null;
public static void main( String [] args ) {
MainWindow w = new MainWindow();

which is in the same package. When I click on Choose Bean, and select to add InnerPanel to the MainWindow class, the Visual Editor shows an X over the inner panel in the java beans tab, and it does not show up.

However, if I run the program, it works fine, and the InnerPanel was added properly. Why does the visual editor not work with package scope? If I change InnerPanel to public scope, the red X goes away.

Any help is greatly appreciated.
Previous Topic:I've got this shell app floating around...
Next Topic:Added JTable to JFrame... now can't add other components
Goto Forum:

Current Time: Mon Jun 25 11:46:29 GMT 2018

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

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

Back to the top