Showing posts with label Netbeans. Show all posts
Showing posts with label Netbeans. Show all posts

Friday, September 21, 2012

CrEME V4.12 with Netbeans IDE 7.2

I need to develop a test application for Windows Mobile 6.5 Professional Phone, using java.

My preferred IDE is Netbeans and I'm using Netbeans 7.2.
  
In NetBeans IDE 7.2, the Platform that use is CrE-ME V4.12 from NSIcom.
But it is not compatible with the Netbeans IDE.
Unfortunately the NSIcom is no longer supported by NetBeans due to legal/licensing problems. If we want to continue using that, please continue using version 6.9.1.  

Bug report from Netbeans mailing list



I contacted the NSIcom, and this was the response I got:
Subject :RE: CrEME V4.12
From:CerEm <
cerem_software@012.net.il>


Use version 6.9.1.

Regards,
Rene, NSIcom Help Desk


-----Original Message-----
Sent: Saturday, September 15, 2012 3:28 PM
To:
info-nsicom@inet.co.il
Subject: CrEME V4.12

How can I use CrEME V4.12 in NetBeans IDE 7.2, because of the following:

"Unfortunately the NSIcom is no longer supported by NetBeans due to
legal/licensing problems. If we want to continue using that, please continue
using version 6.9.1. 
"

From Netbeans:
Hi,

Thank you for your interest in the NetBeans IDE documentation and your 
feedback.

CrEme VM for Windows CE should work with NetBeans IDE 7.1
The NetBeans CDC Emulator Platform Setup Guide at 
http://netbeans.org/kb/71/javame/cdcemulator-setup.html applies to 
versions 6.9, 7.0, and 7.1 of the NetBeans IDE.

CrEme VM for Windows CE is not expected to work with NetBeans IDE 7.2 
which is reflected in the updated doc at 
http://netbeans.org/kb/docs/javame/cdcemulator-setup.html

Regards,
Alyona Stashkova
NetBeans Technical Documentation Team
 
Alternatives:

Thursday, August 16, 2012

Jaybird java.sql.SQLException: not yet implemented

As I said, I am creating an application for professional use. I'm programming in Java and use the Firebird database. Java and chose this database because it's all in Open Source, to run on Windows, Linux, and perhaps in OS X (not tried yet).
  
I was using jaybird-full-2.1.6.jar, to make connections to store images in BLOB fields. But each time he made the connection with specific parameters, always gave the following error:
java.sql.SQLException: not yet implemented

The problem was in the library which had created the necessary methods.

The quickest solution is to use the latest version, jaybird-full-2.2.0.jar.

Tuesday, August 7, 2012

Java PopupMenu

A popup menu to be used in the swing. This code is simplified. Can be used in a fnal class  or within a class of its own.


public class GPaises extends javax.swing.JInternalFrame {

        private void createPopupMenu() {
            try {
           

                //Create the popup menu wiht icons .
                JPopupMenu popup = new JPopupMenu();
                JMenuItem menuItem;
                menuItem = new JMenuItem("Cut, new ImageIcon(getClass().getResource("/gii/images/cut_red.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);
                menuItem = new JMenuItem("Copy", new ImageIcon(getClass().getResource("/gii/images/page_copy.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);
                menuItem = new JMenuItem("Paste", new ImageIcon(getClass().getResource("/gii/images/page_paste.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);
                menuItem = new JMenuItem("Delete", new ImageIcon(getClass().getResource("/gii/images/page_delete.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);
                popup.addSeparator();
                menuItem = new JMenuItem("Add", new ImageIcon(getClass().getResource("/gii/images/picture_add.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);
                menuItem = new JMenuItem("Save", new ImageIcon(getClass().getResource("/gii/images/picture_save.png")));
                menuItem.setHorizontalTextPosition(JMenuItem.RIGHT);
                menuItem.addActionListener(menuListener);
                popup.add(menuItem);

                //Add listener to the text area so the popup menu can come up.
                MouseListener popupListener = new PopupListener(popup);
               
               
                //ActionListener the choice of the popup, the event will buy the name / description in JMenuItem
                ActionListener menuListener = new ActionListener() {
                    public void actionPerformed(ActionEvent event) {
                        if (event.getActionCommand().contentEquals("Cur")) {
                            copy();
                        } else if (event.getActionCommand().contentEquals("Copy")) {
                            copy();
                        } else if (event.getActionCommand().contentEquals("Paste")) {
                            paste();
                        } else if (event.getActionCommand().contentEquals("Delete")) {
                            clear();
                        } else if (event.getActionCommand().contentEquals("Add")) {
                            add();
                        } else if (event.getActionCommand().contentEquals("Save")) {
                            saveAs();
                        }
                    }

                    private void copy() { 
                        //Copy action
                    }

                    private void paste() {
                        //Paste action
                    }

                    private void clear() {
                        //Clear action
                    }

                    private void add() {
                       //Add action
                    }

                    private void saveAs() {
                        //Save ass action
                    }
                };
               
               

               
                //Mouse popup Componunet listener
                //Here we define which is the component that will invoke the popup
                jLIcon.addMouseListener(popupListener);
            } catch (Exception ex) {
                //Error Exception
            }
        }
       
       
       
         class PopupListener extends MouseAdapter {

        JPopupMenu popup;

        PopupListener(JPopupMenu popupMenu) {
            popup = popupMenu;
        }

        public void mousePressed(MouseEvent e) {
            maybeShowPopup(e);
        }

        public void mouseReleased(MouseEvent e) {
            maybeShowPopup(e);
        }

        private void maybeShowPopup(MouseEvent e) {
            if (e.isPopupTrigger()) {
                popup.show(e.getComponent(),
                        e.getX(), e.getY());
            }
        }
    }
}
I accept any comment or improvement. We're always learning.


Java Right mouse click event

This code allows an t right mouse click event. For So may we popup menu. Or other action we want.

So we can add multiple actions, such as a popup menu.


 private void EventMouseReleased(java.awt.event.MouseEvent evt) {                                            
        if (SwingUtilities.isRightMouseButton(evt)) {
            //CODE
        }
    }

I accept any comment or improvement. We're always learning.

Monday, July 30, 2012

Netbeans: vector Obselete Collection

created a vector in Netbeans when it displays the following error: "Obsolete Collection". 


And I found it very strange. So I went to investigate the Netbeans forum. And found this.

 Vector is not deprecated BUT since Java 5 you have : ArrayList.
A Vector is synchronised, an ArrayList is not. So, if you don't use threads, you should use Arraylist instead of Vector.

Java 5 API : http://java.sun.com/j2se/1.5.0/docs/api/
http://netbeans.org/images_www/v5/nb-logo2.gif
Source: http://forums.netbeans.org/post-81854.html