asllop | 27 Feb 16:20 2015
Picon

Java SWT projects for Windows and Mac OS X

I'm working on a Java project using SWT, it is a multi-platform app for Mac OS X and Windows. I started working
on OSX and now I'm porting it to Win. Doing it I faced some troubles, because SWT has not exactly the same
interface for win and osx. What I want to do is to have only one Netbeans project and be able to compile for
both OS. The challenge can be resumed in two points:

1. Automatically selecting the appropriate SWT library (because there is a binary for win and another for osx).

2. Conditional compiling one class or another, because some code doesn't work on Windows (e.g. Display
class method getSystemMenu() ).

What is the better way to do it?

rugyi | 27 Feb 14:18 2015
Picon

Using netbeans with 4k display (dpi scaling)

Hi,

I use a 4k laptop with 15" display.
The windows' scaling now is set to 200%, so now almost everything looks the same like on 2k display, but much sharper.
The problem is that the windows scaling doesn't affect java.
I was trying to find solution on the net, but the conclusion was that each java application should
individually handle the DPI scaling.
Is there any solution, or plugin to handle Netbeans' DPI scaling?

Thanks.

Thufir | 27 Feb 10:27 2015
Picon

background scanning of a project to fix libraries

I'm trying to build a project:

-compile-depend:

-do-compile:
    [mkdir] Created dir: /home/thufir/NetBeansProjects/GreeterLibrary/
build/empty
    [mkdir] Created dir: /home/thufir/NetBeansProjects/GreeterLibrary/
build/generated-sources/ap-source-output
    [javac] Compiling 1 source file to /home/thufir/NetBeansProjects/
GreeterLibrary/build/classes
    [javac] /home/thufir/NetBeansProjects/GreeterLibrary/src/net/bounceme/
doge/ejb/ContactsSessionBeanRemote.java:8: error: package javax.ejb does 
not exist
    [javac] import javax.ejb.Remote;
    [javac]                 ^
    [javac] /home/thufir/NetBeansProjects/GreeterLibrary/src/net/bounceme/
doge/ejb/ContactsSessionBeanRemote.java:14: error: cannot find symbol
    [javac]  <at> Remote
    [javac]  ^
    [javac]   symbol: class Remote
    [javac] 2 errors

BUILD FAILED
/home/thufir/NetBeansProjects/GreeterLibrary/nbproject/build-impl.xml:923: 
The following error occurred while executing this line:
/home/thufir/NetBeansProjects/GreeterLibrary/nbproject/build-impl.xml:263: 
Compile failed; see the compiler error output for details.

Total time: 4 seconds
(Continue reading)

mozum | 27 Feb 08:55 2015
Picon

How to capture webcame image in a canvas

Hello. Can any one help me on how to capture webcam image in a canvas. the code below shows the image captured
in a button, but i want the image displayed in the canvas beside the button as shown in the frame. The second
problem is, the program is not running outside IDE environment as the webcam fail come up. Here is the code:

package webcam2;

import com.lti.civil.CaptureDeviceInfo;
import com.lti.civil.CaptureException;
import com.lti.civil.CaptureObserver;
import com.lti.civil.CaptureStream;
import com.lti.civil.CaptureSystem;
import com.lti.civil.CaptureSystemFactory;
import com.lti.civil.DefaultCaptureSystemFactorySingleton;
import com.lti.civil.Image;
import com.lti.civil.awt.AWTImageConverter;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.List;
(Continue reading)

Jessica Submissivna | 27 Feb 01:49 2015
Picon

Netbean Autocompletion

Hello,

I got this email from Netbeans website and I hoping someone can help me.

My NetBeans has stopped including variables in the autocomplete list from the current file. As you can see, I am trying to enter $limit, which I am using 4 lines above, but in the auto-complete list it only list $limit*variables in all files BUT the current file (which as you can see is users.php). The files that are listed are in my localhost, but they aren't even NetBeans projects.

If I check off the options to only include variables only from the current file, nothing comes up.  At least, before the variables from the current file used to be on top, separated by line, but no longer.

Any suggestions would be greatly appreciated.

Thank you,

Jessica N
Stardust | 26 Feb 20:39 2015
Picon

Suggestions for the code generator

Hello there,

I wanted to request some new features for the code generator:

1. It would be nice to have an option to generate Javadoc for the methods created by the CG. It's not
super-important but it would save a bit of time.

For example, if I introduce getters and setters for a property called 'width', the generator could
generate this:

Code:

/**
 * Returns the width associated with the object.
 *
 *  <at> return The width
 */
public int getWidth() {
    return width;
}

/**
 * Changes the width associated with the object.
 *
 *  <at> param width New width
 */
public int setWidth(int width) {
    this.width = width;
}

--

2. Another feature I just realized was missing would be an option to introduce an event listener.

For example, doing Right Click > Insert Code > Event listener... would let us generate code like this:

Code:

/**
 * Custom event listeners
 */
EventListenerList customListeners;

/**
 * Adds a custom event listener
 *
 *  <at> param listener Listener
 */
public void addCustomListener(CustomListener listener) {
    customListeners.add(CustomListener.class, listener);
}

/**
 * Removes a custom event listener
 *
 *  <at> param listener Listener
 */
public void removeListeners(CustomListener listener) {
    ... Remove listener
}

/**
 * Fires a custom event
 *
 *  <at> param event Event
 */
public void fireCustom(CustomEvent event) {
    ... Cast event
}

This kind of code is always the same, and can easily be generated by the program along with its javadoc.

--

3. I don't know if other developers would want this or if I'm the only one, but in the Formatting options, I'd
like to be able to have one blank line after a method's header and before a method's closing bracket.

This is an example of the coding style convention I use:

Code:
public int getWidth() {

    return width;

}

I like to have a blank line before and after the method's body, but I can't configure it in the formatting
options and have the code generator generate code formatted like this.

--

That's all, I hope these things could be judged useful and be added to the software. 
Thanks!

Rob Rucker | 26 Feb 21:09 2015

scala plugin 8.02 error (file not found)

Hello all, trying to create scala project in NB 8.0.2,
Windows 7 pro (64 bit), java 8 upd 25
scala plugins loaded from tools>plugins
plugins installed ok but creating a vanilla project hangs with not 
finding a file .sh?
Have  uninstalled and re-installed several times. No go -- any ideas??
(Noticed a possible Cygwin solution on StackOverflow but I am not 
running CYgwin)
******************* Errors from an initial run command *********************
SBT -Completion: <tab> -Exit: exit -Help: help.
sbt-launch=C:\Users\robr\AppData\Roaming\NetBeans\8.0.2\modules\ext\org.netbeans.libs.sbt\1\org-scala-sbt\sbt-launch.jar
[ERROR] Failed to construct terminal; falling back to unsupported
java.io.IOException: Cannot run program "sh": CreateProcess error=2, The 
system cannot find the file specified
     at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
regards
robr

ann.maybury@gmail.com | 26 Feb 19:24 2015
Picon

breakpoint highlighting in netbeans 8.0.2

When I turn off a breakpoint (either by toggling ) or from the breakpoint menu (delete or disable), the
breakpoint frequently remains highlighted.   This is very confusing when debugging as you naturally
think the next highlighted line is the next breakpoint.

Also sometimes I get a double box.  What does that mean?

ann.maybury@gmail.com | 26 Feb 19:22 2015
Picon

can't set breakpoint inside document ready

I cannot seem to set a breakpoint inside my document ready function.

How can I confiure my netbeans 8.0.2 to do this?  i used to be able to do this.

tgm1024 | 26 Feb 17:50 2015
Picon

Yet another "Fonts are terrible" post

Ok, I've looked around the web, and I've noticed a few complaints that NetBeans fonts are terrible looking.

Can someone please explain the current state of this, and what the latest workarounds are for NB 8.0.2?

I've verified that this is indeed the case, at least compared to eclipse.  I will if necessary, but posting
image comparisons seems silly since it's such a command problem.

And I've seen several "answers" as to why this is, but no "solution" seems to solve the problem.

Explanations and workarounds seem to hover around:
configuring a LaF to approximate the one used by eclipse's SWT
configuring subpixel rendering for the fonts
some confusing details regarding the 64bit java JVM.dll only existing in the JRE's server directory and
that this comes with differing font support that what is in the client directory of the 32bit JRE.
several command line options; none of which work.

Now focusing on "Consolas 12" for a moment (to pick a monospaced font):

The fonts are much harder to read than in eclipse.  To the point where I just can't deal with it.
On Eclipse, the font is noticeably larger.  There is no configuration specifically driving this that I can
find; not in Windows 7 64/Ultimate (my OS).

dean1.wood | 26 Feb 14:28 2015
Picon

adding a local jar as dependency to a maven project

Hi,

I'm trying to add some local dependencies to a maven project and having some trouble. I create the maven
project, import my source and add the dependencies through right clicking on the dependencies icon. The
jars are added where I would expect them to be and the project will build and run locally in netbeans but
throws the warning:

The POM for json-simple:json-simple:jar:1.1.1 is missing, no dependency information available
The POM for ejml:ejml:jar:0.24 is missing, no dependency information available

These are the dependencies I want. I'm certain I have all the bits pointing to them correct as I can remove the
dependencies and then add them using the search facility. This means that I can't have the wrong group id,
artifact (I'm British, spelling it like that hurts!) and so on as it is added programatically from the path
found by netbeans. 

This warning means that I cannot produce an executable jar file. I've searched on the forums and it seems
netbeans will not create the required POM file as the command it runs in the background is

mvn -DartifactId={artifact id} -DgroupId={group id} -Dversion={version} -Dpackaging=jar
-Dfile={path to jar} -DgeneratePom=false install:install- file 

which explicitly stops the generation of the POM file. 

Is there a way to generate this POM file? Do I need to create it manually? Is it necessary to create an
executable jar file or am I missing something? 

Thanks

Dean


Gmane