Search Results

Search found 1636 results on 66 pages for 'netbeans 7'.

Page 21/66 | < Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >

  • ComboBox Data Binding

    - by Geertjan
    Let's create a databound combobox, levering MVC in a desktop application. The result will be a combobox, provided by the NetBeans ChoiceView, that displays data retrieved from a database: What follows is not much different from the NetBeans Platform CRUD Application Tutorial and you're advised to consult that document if anything that follows isn't clear enough. One kind of interesting thing about the instructions that follow is that it shows that you're able to create an application where each element of the MVC architecture can be located within a separate module: Start by creating a new NetBeans Platform application named "MyApplication". Model We're going to start by generating JPA entity classes from a database connection. In the New Project wizard, choose "Java Class Library". Click Next. Name the Java Class Library "MyEntities". Click Finish. Right-click the MyEntities project, choose New, and then select "Entity Classes from Database". Work through the wizard, selecting the tables of interest from your database, and naming the package "entities". Click Finish. Now a JPA entity is created for each of the selected tables. In the Project Properties dialog of the project, choose "Copy Dependent Libraries" in the Packaging panel. Build the project. In your project's "dist" folder (visible in the Files window), you'll now see a JAR, together with a "lib" folder that contains the JARs you'll need. In your NetBeans Platform application, create a module named "MyModel", with code name base "org.my.model". Right-click the project, choose Properties, and in the "Libraries" panel, click Add Dependency button in the Wrapped JARs subtab to add all the JARs from the previous step to the module. Also include "derby-client.jar" or the equivalent driver for your database connection to the module. Controler In your NetBeans Platform application, create a module named "MyControler", with code name base "org.my.controler". Right-click the module's Libraries node, in the Projects window, and add a dependency on "Explorer & Property Sheet API". In the MyControler module, create a class with this content: package org.my.controler; import org.openide.explorer.ExplorerManager; public class MyUtils { static ExplorerManager controler; public static ExplorerManager getControler() { if (controler == null) { controler = new ExplorerManager(); } return controler; } } View In your NetBeans Platform application, create a module named "MyView", with code name base "org.my.view".  Create a new Window Component, in "explorer" view, for example, let it open on startup, with class name prefix "MyView". Add dependencies on the Nodes API and on the Explorer & Property Sheet API. Also add dependencies on the "MyModel" module and the "MyControler" module. Before doing so, in the "MyModel" module, make the "entities" package and the "javax.persistence" packages public (in the Libraries panel of the Project Properties dialog) and make the one package that you have in the "MyControler" package public too. Define the top part of the MyViewTopComponent as follows: public final class MyViewTopComponent extends TopComponent implements ExplorerManager.Provider { ExplorerManager controler = MyUtils.getControler(); public MyViewTopComponent() { initComponents(); setName(Bundle.CTL_MyViewTopComponent()); setToolTipText(Bundle.HINT_MyViewTopComponent()); setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS)); controler.setRootContext(new AbstractNode(Children.create(new ChildFactory<Customer>() { @Override protected boolean createKeys(List list) { EntityManager entityManager = Persistence. createEntityManagerFactory("MyEntitiesPU").createEntityManager(); Query query = entityManager.createNamedQuery("Customer.findAll"); list.addAll(query.getResultList()); return true; } @Override protected Node createNodeForKey(Customer key) { Node customerNode = new AbstractNode(Children.LEAF, Lookups.singleton(key)); customerNode.setDisplayName(key.getName()); return customerNode; } }, true))); controler.addPropertyChangeListener(new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { Customer selectedCustomer = controler.getSelectedNodes()[0].getLookup().lookup(Customer.class); StatusDisplayer.getDefault().setStatusText(selectedCustomer.getName()); } }); JPanel row1 = new JPanel(new FlowLayout(FlowLayout.LEADING)); row1.add(new JLabel("Customers: ")); row1.add(new ChoiceView()); add(row1); } @Override public ExplorerManager getExplorerManager() { return controler; } ... ... ... Now run the application and you'll see the same as the image with which this blog entry started.

    Read the article

  • 44 Tips for Front End Web Devs (Part 1)

    - by Geertjan
    HTML, JavaScript, and CSS development in NetBeans IDE is fairly new, especially the integrated features of all the editors with the browser. In this screencast, newbies (and even those who have used NetBeans for many years) get a series of tips and insights into using NetBeans IDE in the context of HTML5 development. For example, useful keyboard shortcuts, plugins such as Emmet, and much much more is covered: Part 2 of this series, which is also the final part, is set to be published tomorrow. Note: The outline of the screencast is found in yesterday's blog entry!

    Read the article

  • Installing, Configuring, and Testing WebLogic Server 12c Developer Zip Distribution in NetBeans

    - by JuergenKress
    This tutorial covers how to install Oracle WebLogic Server 12c (12.1.1) developer zip file distribution on Windows and configure it as a Java EE Application Server in NetBeans. Also covers how to test the WebLogic Server installation by deploying a Web application based on JSF and JPA entities. WebLogic Partner Community For regular information become a member in the WebLogic Partner Community please visit: http://www.oracle.com/partners/goto/wls-emea ( OPN account required). If you need support with your account please contact the Oracle Partner Business Center. BlogTwitterLinkedInMixForumWiki Technorati Tags: WebLogic installation,Netbeans,Developer zip,WebLogic Community,Oracle,OPN,Jürgen Kress

    Read the article

  • NetBeans 7.3 Beta2 is Out!

    - by Ondrej Brejla
    NetBeans 7.3 Beta2 was published today. You can download it. You could read about the PHP features added to the NetBeans 7.3 release here on the blog, but the main features added or improved are: Parsers for Namespaced Annotations (Symfony 2, Doctrine 2, etc.), Basic Composer Integration (Dependency Manager for PHP), Twig Code Completion (with documentation), Smarty Braces Matching for Related Tags, Smarty Parser Errors of Unmatched Tags. As obvious you can help us to test the build. Just try it and if you find an issue / error, please report it. Thanks for your help.

    Read the article

  • Dynamically Changing the Display Names of Menus and Popups

    - by Geertjan
    Very interesting thing and handy to know when needed is the fact that "menuText" and "popupText" (from org.openide.awt.ActionRegistration) can be changed dynamically, via "putValue" as shown below for "popupText". The Action class, in this case, needs to be eager, hence you won't receive the object of interest via the constructor, but you can easily use the global Lookup for that purpose instead, as also shown below. import java.awt.event.ActionEvent; import java.text.DateFormat; import java.text.SimpleDateFormat; import javax.swing.AbstractAction; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectInformation; import org.netbeans.api.project.ProjectUtils; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionRegistration; import org.openide.util.Utilities; @ActionID( category = "Project", id = "org.ptt.DemoProjectAction") @ActionRegistration( lazy = false, displayName = "NOT-USED") @ActionReference(path = "Projects/Actions", position = 0) public final class DemoProjectAction extends AbstractAction{ private final ProjectInformation context; public DemoProjectAction() { putValue("popupText", "Select Me To See Current Time!"); context = ProjectUtils.getInformation( Utilities.actionsGlobalContext().lookup(Project.class)); } @Override public void actionPerformed(ActionEvent e) { refresh(); } protected void refresh() { DateFormat formatter = new SimpleDateFormat("HH:mm:ss"); String formatted = formatter.format(System.currentTimeMillis()); putValue("popupText", "Time: " + formatted + " (" + context.getDisplayName() +")"); } } Now, let's do something semi useful and display, in the popup, which is available when you right-click a project, the time since the last change was made anywhere in the project, i.e., we can listen recursively to any changes done within a project and then update the popup with the newly acquired information, dynamically: import java.awt.event.ActionEvent; import java.text.DateFormat; import java.text.SimpleDateFormat; import javax.swing.AbstractAction; import org.netbeans.api.project.Project; import org.netbeans.api.project.ProjectUtils; import org.openide.awt.ActionID; import org.openide.awt.ActionReference; import org.openide.awt.ActionRegistration; import org.openide.filesystems.FileAttributeEvent; import org.openide.filesystems.FileChangeListener; import org.openide.filesystems.FileEvent; import org.openide.filesystems.FileRenameEvent; import org.openide.util.Utilities; @ActionID( category = "Project", id = "org.ptt.TrackProjectTimerAction") @ActionRegistration( lazy = false, displayName = "NOT-USED") @ActionReference( path = "Projects/Actions", position = 0) public final class TrackProjectTimerAction extends AbstractAction implements FileChangeListener { private final Project context; private Long startTime; private Long changedTime; private DateFormat formatter; public TrackProjectTimerAction() { putValue("popupText", "Enable project time tracker"); this.formatter = new SimpleDateFormat("HH:mm:ss"); context = Utilities.actionsGlobalContext().lookup(Project.class); context.getProjectDirectory().addRecursiveListener(this); } @Override public void actionPerformed(ActionEvent e) { startTimer(); } protected void startTimer() { startTime = System.currentTimeMillis(); String formattedStartTime = formatter.format(startTime); putValue("popupText", "Timer started: " + formattedStartTime + " (" + ProjectUtils.getInformation(context).getDisplayName() + ")"); } @Override public void fileChanged(FileEvent fe) { changedTime = System.currentTimeMillis(); formatter = new SimpleDateFormat("mm:ss"); String formattedLapse = formatter.format(changedTime - startTime); putValue("popupText", "Time since last change: " + formattedLapse + " (" + ProjectUtils.getInformation(context).getDisplayName() + ")"); startTime = changedTime; } @Override public void fileFolderCreated(FileEvent fe) {} @Override public void fileDataCreated(FileEvent fe) {} @Override public void fileDeleted(FileEvent fe) {} @Override public void fileRenamed(FileRenameEvent fre) {} @Override public void fileAttributeChanged(FileAttributeEvent fae) {} }

    Read the article

  • Installing Java ME SDK Plugin for NetBeans is now much easier!

    - by SungmoonCho
    The other day, I wrote about how to download and install Java ME SDK plugin for NetBeans. If you are using NetBeans 7.2.1 or later, you don't have to go through the whole process at all. It's now a matter of a few clicks, because all the plugins are now all in NetBeans update server. Here is a new way to install and integrate Java ME SDK plugins for NetBeans. 1. On NetBeans, go to "Tools"- "Plugins". 2. Click on "Available Plugins" tab. Locate "Java ME SDK Tools". 3. Check the tools you want to install, and click "Install" button at the bottom left corner. 4. NetBeans will restart, and that's it! Remember that different Java ME SDK requires different version of Plugins. If you are using Java ME SDK 3.0.5 or earlier, you must install Java ME SDK Tool version 2.0 (works with NetBeans 7.1.2 or earlier) If you are using Java ME SDK 3.2 or later, you must install Java ME SDK Tool version 3.0 (works with NetBeans 7.2 or later)

    Read the article

  • NetBeans/C++ - how to choose the "main file" other than when creating a project?

    - by Petike
    Hello, when I am creating a C++ project in NetBeans, there is a toggle button "Create main file" - I just enter a name for it and that's all. The problem is that I cannot put that file in a "different" folder than right in the main project folder. And I am "used" to put all the source files in a "src" folder (and its subfolders), but at the "project creation time" I "cannot" put the main file there. So I tried "not" to create the main file at project creation, but after that create manually the "src" file and then create a "cpp" file in that folder (this is "allowed" in NetBeans). But NetBeans could not find "which" is the main file. So how can I choose the main file other than when creating a project (if it is possible)?

    Read the article

  • libjpcap.so on Ubuntu for AT&T ARO

    - by Geertjan
    I now have AT&T ARO also running on Ubuntu, in addition to the Windows scenario I blogged about earlier: I managed to get it up and running thanks again to Doug Sillars, who pointed me here: http://developer.att.com/developer/forward.jsp?passedItemId=14100207&passedItemId=14100207 My plan is to make a screencast soon on HOW to port something like ARO, i.e., as an example of how to do something similar yourself, to a plugin for NetBeans IDE, as a follow up to Five Simple Ways to Extend NetBeans IDE. Thanks again, Doug.

    Read the article

  • Lookup Viewer

    - by Geertjan
    The Maven integrated view that I showed yesterday I was able to create because I happened to know that an implementation of SubprojectProvider and LogicalViewProvider are in the Lookup of Maven projects. With that knowledge, I was able to use and even delegate to those implementations. But what if you don't know that those implementations are in the Lookup of the Project object? In the case of the Maven Project implementation, you could look in the source code of the Maven Project implementation, at the "getLookup" method. However, any other module could be putting its own objects into that Lookup, dynamically, i.e., at runtime. So there's no way of knowing what's in the Lookup of any Project object or any other object with a Lookup. But now imagine that you have a Lookup Viewer, as a tool during development, which you would exclude when distributing the application. Whenever new objects are found in the Lookup, the viewer displays them. You could install the Lookup Viewer into NetBeans IDE, or any other NetBeans Platform application, and then get a quick impression of what's actually in the Lookup when you select a different item in the application during development. Here it is (though I vaguely remember someone else writing something similar): Above, a Maven Project is selected. The Lookup Window shows that, among many other classes, an implementation of SubprojectProvider and LogicalViewProvider are found in the Lookup when the Maven Project is selected. If an item in the Lookup Window has its own Lookup, the content of that Lookup is displayed as child nodes of the Lookup, etc, i.e., you can explore all the way down the Lookup of each item found within objects found within the current selection. (What's especially fun is seeing the SaveCookieImpl being added and removed from the Lookup Window when you make/save a change in a document.) Another example is below, showing the Lookup Window installed in a custom application created during a course at MIT in Boston: A small trick I had to apply is that I always show the previous Lookup, since the current Lookup, when you select one of the Nodes in the Lookup Window, would be the Lookup of the Lookup Window itself! If anyone is interested in this, I can publish the NetBeans module providing the above window to the NetBeans update center. 

    Read the article

  • How can I prevent PermGen space errors in Netbeans?

    - by DR
    Every 15-30 minutes Netbeans shows a "java.lang.OutOfMemoryError: PermGen space". From what I learned from Google this seems to be related to classloader leaks or memory leaks in general. Unfortunatly all suggestions I found were related to application servers and I have no idea to adapted them to Netbeans. (I'm not even sure it's the same problem) Is it a problem in my application? How can I find the source?

    Read the article

  • Make NetBeans automatically include newline at end of file?

    - by keithjgrant
    I just switched to NetBeans (6.8) and have noticed some of my files don't end with a newline. This has been a helpful option in other IDEs I've used, but I haven't been able to find it in the NetBeans options menus. Is it buried in there somewhere or is there any other way to make sure it always saves files with a newline at the end? I'm coding primarily in PHP, if it's available in any of the language-specific options.

    Read the article

  • General Questions on setting up Subversion (w/Netbeans) and web development workflow.

    - by Roeland
    Hey guys, I am web developer who currently works mostly on his own but, some projects require outside coding help (my brother.) Anyway, after running in to the problem of "working on the same files" and "saving over each others edits" I decided to research ways to avoid this. Through the help of stackoverflow I decided on subversion. My setup is the following: A windows 2008 server with a clean install. My desktop which is on the local network of the server. Then my brothers desktop which is at his house, not on lan. We both prefer to use netbeans for development. My Questions: How do we set this thing up correctly and most optimally. Here is my current setup and work flow. dev site: in the past I just created sub domains with my web host for test sites (company1.bythepixel.com, company2.bythepixel.com), and editted those sites with netbeans set up having remote sources (ftp). how do i set up my netbeans now? should I set it up with remote sources? I guess I may need to set up a web server on my local server. I'm just not sure of the work flow. When i hit save in netbeans.. will it update the repository.. then do i need to update the site from the repository somehow? live site: when going live, i would just copy all the files from the dev site into the live site. from what i gather i should be able to update the site from the dev repository? Currently I am toying with virtualsvn server (http://www.visualsvn.com/server/) on my local server. It looks like it is set up to use the http protocol. Is there advantages to this or should I consider something that does the file//. Do you recommend any other subversion software that would run on my 2008 box? how will my brother connect? should i set up a permanent vpn from his house to mine? suggestions? (not that important) how do I deal with databases, there anyway to do subversion on database? I know I have a lot of questions and I am trying to read / make sense of the free online subversion book, but its all so overwhelming! Wish there was a small subversion for dummies guide :)

    Read the article

  • How to line-wrap console output in NetBeans 6.8?

    - by JRL
    Is there a way to make the console output text wrap based on the actual width of the window? I have limited screen height real estate on my laptop, and so want to have the console window docked on the right rather than the bottom of the window. An option or a plugin is fine, I'm using NetBeans 6.8. If this exists in a newer version of NetBeans, please say so, but I can't install a dev build.

    Read the article

  • How can I setup my Netbeans IDE for making Jave ME applications?

    - by Sergio Tapia
    Ok, I have Netbeans 6.7.1 installed with the default Java SDK. I'm using Linux Mint. Now I'm told that I have to download Java Platform Micro Edition Software Development Kit 3.0 So, should I download this? And once I download and install this in Linux, what do I have to install for Netbeans so I can create a Mobile Application? I'm fairly new to this environment so please any advice is welcome! :)

    Read the article

  • How to make "Open File..." window in netbeans PLATFORM?

    - by joseph
    Hello, I need to create something like internal frame in netbeans platform, which loads file from any location. I tried it by jInternalFrame, but I was not able to find some container to which I can add my frame. I am working in netbeans platform, which has own pre-created main window. Pease help me by any advice, I am dealing with this about 10 hours, still without result.

    Read the article

< Previous Page | 17 18 19 20 21 22 23 24 25 26 27 28  | Next Page >