Netbeans

  5 posts   Feedicon  
Replies: 4 - Last Post: May 25, 2010 20:10
by: Tim Boudreau
showing 1 - 5 of 5
 
Posted: March 12, 2010 19:56 by willishf

I downloaded the netbeans library and added it to my Palette. I was then hoping to use ValidationPanel instead of JPanel for GUI layout. I can add ValidationPanel to a Panel but it does not let me drop in a text field etc. Is this expected behavior or do I need to do something special. I am running 6.8

 
Posted: March 13, 2010 12:13 by willishf
It appears this is a netbeans limitation where you can't use a custom Jpanel for GUI layout. I was able to work around it by adding ValidationPanel to a JPanel and then adding a JPanel to the Other Components area and then adding that JPanel via the ValidationPanel properites setInnerComponent. I add a method addValidation() and do all the validation logic setup which get called after initComponents().

 
Posted: March 19, 2010 22:20 by Tim Boudreau
Easiest way in NetBeans is to just use new JPanel Form, and once it's created, change "extends javax.swing.JPanel" to "extends ValidationPanel" - the GUI editor will not notice this change.

Generally, it should work to put panel subclasses on the palette and then use them as panels - the only thing being that if a layout manager is already set, that can confuse things.
 
Posted: April 19, 2010 15:28 by simonom
i'm loving the idea of this project in concept but i can't get it to work on my retrofit project. I'm using netbeans and my forms are jDialogs- What's the best way for me to adapt my project?
 
Posted: May 25, 2010 20:10 by Tim Boudreau
Implement a ValidationUI which enables/disables the buttons that can close your dialog, and set up the ValidationGroup to do that.

See ValidationPanel.showDialog() in the source code - it does pretty much what you'll need.
Replies: 4 - Last Post: May 25, 2010 20:10
by: Tim Boudreau
  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close