Results 1 to 4 of 4
Thread: what had happen to this?
- 01-27-2012, 11:20 AM #1
Member
- Join Date
- Jan 2012
- Posts
- 48
- Rep Power
- 0
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.
- 01-27-2012, 11:24 AM #2
Re: what had happen to this?
there an error in the "component" called background. please post the code.
- 01-27-2012, 11:40 AM #3
Member
- Join Date
- Jan 2012
- Posts
- 48
- Rep Power
- 0
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"
- 01-27-2012, 12:09 PM #4
Member
- Join Date
- Jan 2012
- Posts
- 48
- Rep Power
- 0
Similar Threads
-
What happen to the code?
By mathidioticz in forum New To JavaReplies: 6Last Post: 01-21-2012, 05:56 PM -
java is now owned by oracle so what will happen to java in future !
By funkygarzon in forum Forum LobbyReplies: 5Last Post: 07-14-2011, 07:45 AM -
what happen whene jar file (j2me) install on mobile device ???
By mahdi-farzami in forum CLDC and MIDPReplies: 2Last Post: 06-18-2010, 01:15 PM -
what happen if an object set to null
By SaYuNaRa in forum New To JavaReplies: 5Last Post: 04-17-2008, 04:15 AM -
To happen of ActionErrors to ActionMessage
By Eric in forum New To JavaReplies: 1Last Post: 07-05-2007, 07:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks