This question is answered.


Permlink Replies: 21 - Pages: 2 [ Previous | 1 2 ] - Last Post: 18-Oct-2020 13:55 Last Post By: JeffTucker Threads: [ Previous | Next ]
AndreWolff

Posts: 1,762
Registered: 14-Dec-2007
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 16-Oct-2020 19:19   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
It doesn't matter where you define the variables - all in one file, or in two separate files.

SkinModel.java sets defaults for variables that apply to the entire project. SlideModel.java sets defaults for variables that apply only to individual objects (images, folders, whatever).

Well I use now also 4 files in the same way as you do in the Pluto skin.
The whole conversion did take a lot of time, but it seems to work now without problems.

Thanks for your help.
AndreWolff

Posts: 1,762
Registered: 14-Dec-2007
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 17-Oct-2020 10:02   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
Just a last question about JSpinner initialization:

The Pluto SkinModel.java file contains default values for spinners like
    public int navIconSize = 32;
But I see that value also in Pluto.java
            JSpinner navIconSize = new JSpinner(new SpinnerNumberModel(32, 16, 48, 1));
Why don't you use this statement:
            JSpinner navIconSize = new JSpinner(new SpinnerNumberModel(16, 48, 1));
?
JeffTucker

Posts: 6,866
Registered: 31-Jan-2006
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 17-Oct-2020 12:55   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff

Posts: 1,762
Registered: 14-Dec-2007
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 17-Oct-2020 18:17   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
jGromit wrote:
Because SpinnerNumberModel() takes four values.
Yes I know, but for instance JNumberField takes 2 or 1 argument(s) (although this are arguments of different data types), so I thought you can use a Spinner also with 3 or 4 arguments, but apparent JAVA is not that clever.

But which value has the highest priority, the SkinModel.java definition or the Pluto.java definition?
JeffTucker

Posts: 6,866
Registered: 31-Jan-2006
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 17-Oct-2020 23:30   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
AndreWolff wrote:
But which value has the highest priority, the SkinModel.java definition or the Pluto.java definition?

Why don't you try it, and find out? That would take less time than you posting the question, then waiting for me to get home to answer it.
AndreWolff

Posts: 1,762
Registered: 14-Dec-2007
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 18-Oct-2020 11:03   in response to: JeffTucker in response to: JeffTucker
 
  Click to reply to this thread Reply
For your information: the SkinModel.java value gets the highest priority.
But a value 0 in Pluto.java is accepted in NetBeans, but gives a crash if used in the skin, so error checking in NetBeans is poorly.
Why can't I see the meaning of the JSpinner arguments in the context menu?
JeffTucker

Posts: 6,866
Registered: 31-Jan-2006
Re: Panoramic custom panel code gives errors in NetBeans
Posted: 18-Oct-2020 13:55   in response to: AndreWolff in response to: AndreWolff
 
  Click to reply to this thread Reply
Not even NetBeans can compensate for all the different ways you find of screwing things up.
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums