It uses javax.swing.JPanel because it didn't insert an import statement. If you use an import statement, then you can use just JPanel. This was a choice by the programmers of Matisse to use the fully qualified name instead of adding an import statement and just using the Class name.
On 7/15/09, Alex Fuentes <[email protected]> wrote: > Hi Rita and Mark, > Perfectly understood. Thank you very much! > > Last question: > When I make a GUI with Matisse, the autogenerated code at variable > declaration point is like that: > > public javax.swing.JPanel *whatever*; > > The reason by which NBeans adds this extra code (*javax.swing.*), is to > avoid the ambiguity, too? > > Thanks! (and sorry by my English) > > > 2009/7/15 Rita <[email protected]> > >> >> Hi Alex, >> it will not produce higher load to the system if you use the second >> method. Java calls it 'type import on demand'. >> The compiler will search for the class only if it is really needed. >> But there may be ambiguity if the same class name does exist in two >> different packages: >> the class 'Date' for example exists in java.util as in java.sql. In >> this case you should always use the full description as >> import java.util.Date; >> >> hth, Rita >> >> > >> > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
