Peter B. West | 1 Mar 01:42
Picon

Re: NetBeans 6.5 gets error when switching to design view

raysaun wrote:
> Well, I finally figured this one out after I found the IDE Log.  It appears that the IDE executes the
constructor of the classes containing swing items in order to display the window when Design is selected. 
If a constructor contains any references to a class which will only be satisfied at run time, the reference
will not be initialized and a null pointer exception will occur.
> 
> ------------------------
> Ray Saunders

I've recently been through the same problem. I'm glad you were able to
work this out. The behaviour of the GUI builder was explained to me by
one of the NB team.

In essence, the components you add to the GUI are beans. I had only a
very loose understanding of beans, so I went back and read the spec.

They are designed to enable higher-level composition by toolkits, and
their naming conventions allow such toolkits to instantiate and
manipulate the bean, including the getting and setting of fields, the
events that the bean reports, and the accessible methods. A BeanInfo
class can be provided to override some or all of this information.

Beans include the notion of design time and run time. The Beans utility
class includes the static method isDesignTime() which can be used to
differentiate the cases, in, for example, your constructor. If you have
runtime dependencies in any component, you should probably protect all
areas with ( ! Beans.isDesignTime() ).

That's about as far as I've gone with this.

(Continue reading)

raysaun | 1 Mar 02:34
Picon

NetBeans 6.5 gets error when switching to design view

Thanks Peter,

I retired in 2002 after 46 years of programming.  Had not written a line of code until about two weeks ago.  It is
amazing how much you can forget in  seven years.  When I think about it, I ran in the same kind of problem using
Borland's JBuilder way back then.  It is starting to come back though.

Ray

------------------------
Ray Saunders

Rick | 1 Mar 03:46
Picon

Re: Cant find librarys at compile time

Hi, I had this problem about 8 months ago. At that time, I just add
libs to my project but forgot to select the checkbox behind the libs
in the libs list.

So I can code but not to compile. if any help, try.

On Sat, Feb 28, 2009 at 6:32 PM, RobbingDaHood <superDACAL <at> gmail.com> wrote:
> I am working on a JDOM projekt that have to run on a Tomcat server, I have added the jdom.jar and server.jar
librarys to my projects classpath, And when I write the codes there are no errors. But when I try to compile
my projekt I get this error:
>
>
>
>
> Code:
>
>
> package javax.servlet.http does not exist
>
> import javax.servlet.http.*;
>
>
>
>
>
> I have imported them in the file, or else I would have been given an error:
>
>
>
>
(Continue reading)

Rick | 1 Mar 03:55
Picon

Re: Keyboard Shortcut for "Call Hierarchy"

Call Hierachy? Press F12 or Alt+F12. have a try.

On Sat, Feb 28, 2009 at 2:00 AM, David Heffelfinger
<dheffelfinger <at> ensode.net> wrote:
> I frequently use the "Call Hierarchy" feature that was introduced in NB 6.5
> by right clicking on a method and selecting "Call Hierarchy".
>
> Since I use that feature so frequently, I would like to bind it to a
> keyboard shortcut, but for the life of me I can't find that action anywhere
> in the NetBeans keymap.
>
> Is it in there? Could someone please point me to the correct location?
>
> Back in my Eclipse days this was mapped to ctrl+alt+H, that is one bit I
> miss from Eclipse.
>
> Thanks in advance,
> David
>
> --
> http://ensode.net - A Guide to Java, Linux and Other Technology Topics
> http://www.packtpub.com/java-ee5-development-with-netbeans-6/book - Java EE
> 5 Development Using NetBeans 6
> http://java-ee-5-glassfish.packtpub.com/ - Java EE 5 Development Using
> GlassFish Application Server
> http://jasperreportsbook.packtpub.com - JasperReports For Java Developers
>

tkellerer | 1 Mar 12:17
Picon

Is there any component that could work as a timer for Java SE? for cycle task programming

I don't know why you are looking for a "component". 

You can using javax.swing.Timer 

http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/Timer.html

or java.util.Timer

http://java.sun.com/j2se/1.5.0/docs/api/java/util/Timer.html

You might be interested in the tutorial as well:

http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html

maruffaiz | 1 Mar 08:56
Picon

Signing J2ME Application.

Hi All,

I am new in J2ME. I have created an application in J2me. And I need to sign the same.

Can anybody please tell me how to do the same.

Thanks,

FAIZ

Zian | 1 Mar 13:45
Picon

Documentation for Making A Custom GUI Control

Thank you so much! That was exactly what I was trying to do.

It looks so simple in retrospect....perhaps I should file a feature request for greater usability
testing. ;)

Watson, Meg | 1 Mar 15:24
Picon
Favicon

RE: How to add a Swing container from another class and have it be visible?

Maybe the code would help...

Here is NewJFrame.java (creates a JFrame with a JPanel in it, which is an instantiation of TestJPanel) and
TestJPanel.java below it, comments removed for brevity's sake:

NewJFrame.java
==============
package my.gui;

public class NewJFrame extends javax.swing.JFrame {

    public NewJFrame() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    private void initComponents() {

        jPanel1 = new my.gui.TestJPanel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 400, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
(Continue reading)

David Heffelfinger | 1 Mar 17:21
Picon

Re: Keyboard Shortcut for "Call Hierarchy"

Thanks Rick but that is not quite what I am looking for. In the Java editor, we can right click on any method and open a call hierarchy window by selecting "Call Hierarchy" (see attached screenshot).

What I want to do is bind that action to a keyboard shortcut, I don't think it is possible right now but I thought it wouldn't hurt to ask.

Thanks,
David

On Sat, Feb 28, 2009 at 9:55 PM, Rick <rickqinj <at> gmail.com> wrote:
Call Hierachy? Press F12 or Alt+F12. have a try.

On Sat, Feb 28, 2009 at 2:00 AM, David Heffelfinger
<dheffelfinger <at> ensode.net> wrote:
> I frequently use the "Call Hierarchy" feature that was introduced in NB 6.5
> by right clicking on a method and selecting "Call Hierarchy".
>
> Since I use that feature so frequently, I would like to bind it to a
> keyboard shortcut, but for the life of me I can't find that action anywhere
> in the NetBeans keymap.
>
> Is it in there? Could someone please point me to the correct location?
>
> Back in my Eclipse days this was mapped to ctrl+alt+H, that is one bit I
> miss from Eclipse.
>
> Thanks in advance,
> David
>
> --
> http://ensode.net - A Guide to Java, Linux and Other Technology Topics
> http://www.packtpub.com/java-ee5-development-with-netbeans-6/book - Java EE
> 5 Development Using NetBeans 6
> http://java-ee-5-glassfish.packtpub.com/ - Java EE 5 Development Using
> GlassFish Application Server
> http://jasperreportsbook.packtpub.com - JasperReports For Java Developers
>



--
http://ensode.net - A Guide to Java, Linux and Other Technology Topics
http://www.packtpub.com/java-ee5-development-with-netbeans-6/book - Java EE 5 Development Using NetBeans 6
http://java-ee-5-glassfish.packtpub.com/ - Java EE 5 Development Using GlassFish Application Server
http://jasperreportsbook.packtpub.com - JasperReports For Java Developers
Jacek Laskowski | 1 Mar 19:02
Picon
Favicon
Gravatar

Rename vs Refactor > Rename in Grails projects

Hi,

I use the latest development NetBeans daily build and noticed that
Rename on a groovy file changes the file name itself without making
any change in the class name itself. I also noticed that Refactor >
Rename was disabled (grayed out) which made me wonder how different it
ought to be from the Rename function. Should they work alike (and
eventually change the appropriate class name in the file)? Is this a
feature being worked on? Shall I file an issue in IZ?

Jacek

--

-- 
Jacek Laskowski
Notatnik Projektanta Java EE - http://www.JacekLaskowski.pl


Gmane