Results 1 to 4 of 4
  1. #1
    mathidioticz is offline Member
    Join Date
    Jan 2012
    Posts
    48
    Rep Power
    0

    Default what had happen to this?

    What does the error "A previous error prevented bean from being created" mean?
    I am trying to open up a Swing window in Visual Editor but could not see all the widgets. I can only see a "this" icon, with "i" indicator which is shown as the image below.
    I do not know how to solve this error..
    Please help me.

    what had happen to this?-prob.png

  2. #2
    j2me64's Avatar
    j2me64 is offline Senior Member
    Join Date
    Sep 2009
    Location
    Zurich, Switzerland
    Posts
    962
    Rep Power
    6

    Default Re: what had happen to this?

    there an error in the "component" called background. please post the code.

  3. #3
    mathidioticz is offline Member
    Join Date
    Jan 2012
    Posts
    48
    Rep Power
    0

    Default Re: what had happen to this?

    Here is the code.
    I can view the panel when i run it. But there is no image in the visual editor.

    Java Code:
     
    
    package OOPJ.ui;
    
    import javax.swing.JPanel;
    import java.awt.Dimension;
    import javax.swing.JLabel;
    import java.awt.Rectangle;
    import java.awt.Point;
    import javax.swing.ImageIcon;
    import java.awt.Color;
    import java.awt.event.KeyEvent;
    
    import javax.swing.SwingConstants;
    import javax.swing.JTextField;
    
    import cancer.entity.CancerDetails;
    import javax.swing.JTextArea;
    import javax.swing.JButton;
    import java.awt.Font;
    
    public class CancerDetailsPanel extends JPanel {
    
    	private static final long serialVersionUID = 1L;
    	private JLabel jLabelTitle = null;
    	private JTextField jTextFieldArticleTitle = null;
    	private JLabel jLabelImg = null;
    	private JTextArea jTextAreaDetails = null;
    	private CancerDetails cancer = null; 
    	private MainFrame myFrame = null; 
    	/**
    	 * This is the default constructor
    	 */
    	
    	public CancerDetailsPanel() {
    		super();
    		initialize();
    	}
      public CancerDetailsPanel(MainFrame f) { 
    	  this(); 
    	  myFrame = f; 
      }
    
    	
    
    	/**
    	 * This method initializes this
    	 * 
    	 * @return void
    	 */
    	private void initialize() {
    		jLabelImg = new JLabel();
    		jLabelImg.setBounds(new Rectangle(41, 198, 257, 248));
    		jLabelImg.setText("");
    		jLabelImg.setDisplayedMnemonic(KeyEvent.VK_UNDEFINED);
    		CancerDetails c1 = new CancerDetails();
    		jLabelImg.setIcon(new ImageIcon(c1.getC_image1()));
    		jLabelImg.setHorizontalAlignment(SwingConstants.CENTER);
    	
    		
    		jLabelTitle = new JLabel();
    		jLabelTitle.setText("");
    		jLabelTitle.setSize(new Dimension(431, 70));
    		jLabelTitle.setIcon(new ImageIcon(getClass().getResource("/images/ui/images/Cancer Title.jpg")));
    		jLabelTitle.setHorizontalAlignment(SwingConstants.CENTER);
    		jLabelTitle.setLocation(new Point(131, 27));
    		this.setSize(700, 800);
    		this.setLayout(null);
    		this.setBackground(Color.white);
    		this.add(jLabelTitle, null);
    		this.add(getJTextFieldArticleTitle(), null);
    		this.add(jLabelImg, null);
    		this.add(getJTextAreaDetails(), null);
    
    		
    		CancerDetails u1 = new CancerDetails(); 
    		u1.retrieveCancer(); 
    		jTextFieldArticleTitle.setText(u1.getC_articleTitle());
    		jTextAreaDetails.setText(u1.getC_articleDetails());
    		
    	}
    
    	/**
    	 * This method initializes jTextFieldArticleTitle	
    	 * 	
    	 * @return javax.swing.JTextField	
    	 */
    	private JTextField getJTextFieldArticleTitle() {
    		if (jTextFieldArticleTitle == null) {
    			jTextFieldArticleTitle = new JTextField();
    			jTextFieldArticleTitle.setBounds(new Rectangle(35, 119, 634, 46));
    			jTextFieldArticleTitle.setHorizontalAlignment(JTextField.CENTER);
    			jTextFieldArticleTitle.setBackground(Color.white);
    			jTextFieldArticleTitle.setEditable(false);
    		}
    		return jTextFieldArticleTitle;
    	}
    
    	/**
    	 * This method initializes jTextAreaDetails	
    	 * 	
    	 * @return javax.swing.JTextArea	
    	 */
    	private JTextArea getJTextAreaDetails() {
    		if (jTextAreaDetails == null) {
    			jTextAreaDetails = new JTextArea();
    			jTextAreaDetails.setBounds(new Rectangle(313, 177, 369, 307));
    		}
    		return jTextAreaDetails;
    	}
    
    
    	  
    
    }  //  @jve:decl-index=0:visual-constraint="116,111"

  4. #4
    mathidioticz is offline Member
    Join Date
    Jan 2012
    Posts
    48
    Rep Power
    0

    Default Re: what had happen to this?

    please help me. I really stuck at this part and couldn't proceed with the rest of the programs..

Similar Threads

  1. What happen to the code?
    By mathidioticz in forum New To Java
    Replies: 6
    Last Post: 01-21-2012, 06:56 PM
  2. Replies: 5
    Last Post: 07-14-2011, 08:45 AM
  3. what happen whene jar file (j2me) install on mobile device ???
    By mahdi-farzami in forum CLDC and MIDP
    Replies: 2
    Last Post: 06-18-2010, 02:15 PM
  4. what happen if an object set to null
    By SaYuNaRa in forum New To Java
    Replies: 5
    Last Post: 04-17-2008, 05:15 AM
  5. To happen of ActionErrors to ActionMessage
    By Eric in forum New To Java
    Replies: 1
    Last Post: 07-05-2007, 08:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •