Click here to Skip to main content
15,893,161 members
Everything / Netbeans

Netbeans

netbeans

Great Reads

by Pritam Zope
In this article, we will create a notepad in Java with features like Multi Tabbed Documents, Document Selector, Openning/Saving/Closing Multiple documents, Running External Programs,Different Look and Feels, Viewing files in Browser, etc.
by Michael B Pliam
A recursive descent math expression parser with built-in functions and a variable mapping
by Michael B Pliam
An easily modifiable console like interface for testing Java code
by SOHAM_GANDHI
How to capture video from webcam and video file (*.AVI)

Latest Articles

by Michael B Pliam
A recursive descent math expression parser with built-in functions and a variable mapping
by Michael B Pliam
An easily modifiable console like interface for testing Java code
by Pritam Zope
In this article, we will create a notepad in Java with features like Multi Tabbed Documents, Document Selector, Openning/Saving/Closing Multiple documents, Running External Programs,Different Look and Feels, Viewing files in Browser, etc.
by SOHAM_GANDHI
How to capture video from webcam and video file (*.AVI)

All Articles

Sort by Score

Netbeans 

15 Feb 2017 by Pritam Zope
In this article, we will create a notepad in Java with features like Multi Tabbed Documents, Document Selector, Openning/Saving/Closing Multiple documents, Running External Programs,Different Look and Feels, Viewing files in Browser, etc.
3 Jul 2012 by OriginalGriff
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...A very quick search copied from your question gave over one and a half million...
19 Sep 2012 by andrevdcolff
Ok, there are 3 problems here and then 1 thing you probably want to add as Richard MacCutchan said (Checking if b is null)1 - You need to call getFolders() using d:\\ not d:2 - Your iterative loop will need to start from the 0 index not 13 - Use absolute pathing if you want recursion to...
10 Apr 2013 by CPallini
Quote:std::shared_ptr p(new Person("Scott", 25));It should bestd::shared_ptr p(new Person("Scott", 25));shouldn't it?The following code compiles (and runs) fine (Visual C++ Express 2010):#include #include class Person{ int age; const char *...
10 Apr 2013 by Orjan Westin
std::shared_ptr is a C++11 addition. (It was in Technical Report 1, published in 2007. VC++ 2010 included it in since it was well known it would become part of the standard, but strictly speaking it should have been left in the tr1 namespace.)If your compiler doesn't support C++11,...
15 Apr 2013 by Sergey Alexandrovich Kryukov
Please see my comment to the question: some important declarations are missing.However, I think I can see at least one more or less apparent bug, which is apparent even without knowing the detail of wordTable implementation. The bug is in this line:wordTable.add(nextWord, new...
16 Jan 2016 by OriginalGriff
Well, since the due date for this homework was 3 days ago: How Can I Create A Parser In Java In Netbeans?[^]But you were still asking about it 2 days ago: How Can I Create A Parser According To Given Grammar And Check Given Input Code Is Correct Or Not According To Gramme[^]I'll repeat what...
29 May 2016 by Richard MacCutchan
It looks like you are using some form of data binding to display the details, which will result in the table you see. To create the alternate version you will need to do one of two things:1. Read all data manually and insert each item into the row and column you want.2. Convert each row from...
25 Oct 2016 by Jochen Arndt
I did not checked all the code but you are not adding the passed lesson:public void addLesson(Lesson l) { if (number == size) { Lesson ListNew[] = new Lesson[size + 1]; for (int i = 0; i
7 Jul 2017 by OriginalGriff
Non-static objects - i.e. anything declared without the static keyword - are part of the "body" of a class, and only exist within an instance of that class: each time you create an new instance, you create a new version of each of the non-static objects within it. It's like a car: when you buy...
2 Mar 2018 by Richard MacCutchan
Start with a piece of paper and a pen or pencil. Draw each array as a set of boxes, and add the numbers in the right places. Now see what needs to be done to get from there to the answer, in logical steps. Write each step as you figure it out, updating the diagrams as you go. When you have...
21 Mar 2018 by Richard MacCutchan
Do not put all those if statements inside your paint method. And get rid of all that duplicate code, there are much simpler ways to handle a selection like that. The paint method should only be concerned with drawing the 'current' image to the screen. You do the tests elsewhere, set the current...
28 Jun 2018 by OriginalGriff
Look at the code: String query="insert into hotelp (bno,name,phone,rno,rtype,days,perday,total) values ( '"+book+"','"+name+"','"+phone+"','"+rno+"','"+days+"','"+pday+"','"+total+"');"; Now match up the data with the columns: bno book name name phone phone rno rno ...
9 Aug 2023 by Andre Oosthuizen
You are using square brackets and spaces in the database URL, which is causing the connection to be refused. The URL format for connecting to a Derby database should not include square brackets or spaces. Also, it seems that you are using the...
5 Jul 2012 by Pasan Eeriyagama
If Java Runtime (JRE) is installed on the target machine, you don't need to create a .exe file. A .jar file is more than enough.You may try this to [^] create installers for JAVA apps.
6 Aug 2012 by Raje_
Here you are using createStatement() method, because you are inserting values to database you need to use prepareStatement method:- PreparedStatement ps = scon.prepareStatement("INSERT INTO P_LOGIN VALUES(?,?,?)"); ps.setString(1, txtAddUserName.getText()); ...
30 Sep 2012 by OriginalGriff
Either rename the tables, or enclose the names:SELECT * FROM [300-500]
14 Nov 2012 by TorstenH.
even simpler:// find program for given fileProgram p = Program.findProgram("pdf"); // could also be html or whatever p.execute(printFilePath); // throw file at programOne simply lets the OS decide and take action. It's pretty failsafe.
22 Nov 2012 by Richard MacCutchan
Which DBMS is the best for netbeans.None: you need to understand that Netbeans is merely a development environment that helps you to write Java programs. The end product is Java code and it does not rely on any part of Netbeans. The choice of database is entirely up to you and depends on the...
22 Nov 2012 by TorstenH.
JDBC: YES, unless you want to use Hibernate or anything like that.Check out the derby database, it's pretty slick, works fine and would totally integrate with your application. So you wont have to bother with additional stuff.Did I mention it's free? pretty cool.Apache Derby[^]
18 Jan 2013 by Sergey Alexandrovich Kryukov
You can use File(MyClass.class.getProtectionDomain().getCodeSource().getLocation().getPath());.[EDIT #1]Answering the follow-up questions:I have no idea what is "GraduationProject". Look at the result of this expression. Is it a real path? If it's almost where you need, adjust it...
7 Mar 2013 by OriginalGriff
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.Try it yourself, you may find it...
28 Mar 2013 by Matthew Faithfull
The trite answer is, any way you want. I suspect what you're really asking is what cross platform frameworks are available that integrate with Netbeans in the way that MFC integrates with Visual Studio or Qt with QtCreator.As far as I know the answer is none, primarily because Netbeans like...
31 Mar 2013 by Matthew Faithfull
Right click on your project in the projects list, select properties and then select Build from the tree on the left of the Properties dialog.In the right hand pane you will see Configuration Type as one of the items, select Dynamic Library from the drop down list to the right. Now your projec...
2 Apr 2013 by Matthew Faithfull
I'm guessing you probably didn't want to post your code as a solution but never mind. There are a few odd things here but I don't know for sure if any of them are the cause of the error message you're seeing.You're using Dynamic/Late/Runtime/Explicit loading of the Dll in this code which is...
15 Apr 2013 by CPallini
As others already pointed out, your question (and your code) is incomplete. Hence I may give you just a couple of remarks:Are you sure the world delimiter is just a comma (usually it is a blank and other punctuation characters)?Quote:wordTable.add(nextWord, new Integer(wordFrequency)); this...
24 May 2013 by Valentine1993
it is called int setLineWrap(boolean)
21 Jun 2013 by Bernhard Hiller
There is a tutorial available for the feature "MRU files":http://wiki.netbeans.org/AddingMRUList[^]
19 Jul 2013 by Shubhashish_Mandal
If you use jdk 1.7 then it will be easy otherwise you have customise the UI of the TabbedPaneCheck thishttp://docs.oracle.com/javase/tutorial/uiswing/components/tabbedpane.html[^]
11 May 2014 by OriginalGriff
Why, I have to ask, are you using parseInt anyway?public static String checkDigits(int cardNo){ String a = new String (); a = cardNo + " "; char [ ] array = a.toCharArray ( ); int [ ] array2 = new int [7]; for ( int i = 0; i
21 Jun 2014 by Kornfeld Eliyahu Peter
You probably missing some import of the library contains the Base64 functionality...one option is...import org.apache.commons.codec.binary.Base64;...and alter in your code...byte [] base64Bytes = Base64.encodeBase64(buf);
24 Jun 2014 by CPallini
Google is your friend:"Console input in Java"[^]."Sorting strings in Java"[^].
9 Dec 2015 by ridoy
Try with this code:String passText = new String(userPass.getPassword());
14 Dec 2015 by ridoy
Not only a form variable, you can access a variable of class A to class B by making it simply public static . Did you try that?Class A{ public static int a=0;}Class B{ public void yourMethod(){ A.a = 10; }}
8 Jan 2016 by Richard Deeming
At a guess, jtextfield is defined as an instance member of the class classB, but you're trying to access it like a class (static) member.This is a common problem for users coming from VB.NET, since VB.NET creates a default instance of your Form classes for you, and makes them available as...
11 Jan 2016 by Richard MacCutchan
It should really crash your app. You create a new instance of class1, try to click a checkbox in it which you have not yet created, then leave this method, at which time this object gets deleted. You need to select the checkbox that exists on the screen, and in your original object, that you...
11 Jan 2016 by Roland 57
The problem is: class1 is not fully instantiated yet.You should use Swingutilities.invokelater(...).
12 Jan 2016 by Roland 57
package test;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JCheckBox;import javax.swing.JFrame;/** * * @author Roland */public class Test { private static class A extends JFrame { ...
20 Mar 2016 by Afzaal Ahmad Zeeshan
One thing to note is that, in most of the cases of Google SMTP server, is that it won't allow SMTP consumption directly, if your account doesn't allow. In many cases, I have seen that many developers have written a correct implementation of the protocol API, but still they cannot send the email....
2 Apr 2016 by Ma'd Saeed
How to get selected date from JXDatePicker in yyyy-MM-dd format in JAVA?What I have tried:jXDatePicker1.getDate().toString("yyyy-MM-dd");
16 Apr 2016 by Richard MacCutchan
See https://docs.oracle.com/javase/tutorial/jaxp/xslt/writingDom.html[^].
28 Apr 2016 by Richard MacCutchan
If you are still learning then I would suggest you forget about glassfish and any other advanced subjects. Go to The Java™ Tutorials[^] and work your way through the tutorials until you feel comfortable with the basics.
11 Aug 2016 by Jochen Arndt
Not really an answer but I hope it helps (and posting such a long text as unformatted comment makes it rather unreadable).Quote:NetBeans is giving the CygWin make utility (known as mktemp)andQuote:mktemp.exe -f Makefile CONF=Debugdoes not match.It seems that the NetBeans IDE is using...
25 Oct 2016 by Kornfeld Eliyahu Peter
Come on!!!Can't you read error messages and trace?Quote:Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - missing return statementIt means you have a method somewhere that does not return a value, but should...So it can not be compiled...Quote:at...
5 May 2017 by wseng
As @Richard said, you are not using x in the setText statement. The answer should be costOutput.setText("The cost of the pizza is $" + x.format(totalCost));
27 Sep 2017 by CPallini
Expressions, Statements, and Blocks (The Java™ Tutorials > Learning the Java Language > Language Basics)[^].
25 Nov 2017 by CPallini
Do you mean something similar to #include #include using namespace std; class A { public: //some functions A(int x, string s, int x2, string s2); private: class B { public: B(int x, string s); string s; int x; };//ends the nested class B b; string...
9 Jan 2018 by Dave Kreskowiak
A beginner in programming? Yeah, this project is so far advanced beyond your skill level as to be impossible to describe the concepts to you and have you understand them. Attempting do so would require writing more than a few books on the topic and all the topics required to get you to the...
9 Jan 2018 by Patrice T
Quote: I am a very beginner in programming and I want to use java to write the program. I have researched some sources but it did not work for me. I appreciate every helps. The best advice is don't. This kind of project is for fully skilled programmers. It is like trying to get a degree in...
3 Feb 2018 by Richard MacCutchan
I explained what you need to do in your question yesterday, and even gave you the link to the documentation for the Select clause. So why are you now doing it another incorrect way? You need to do the following: - Create a SELECT clause to find the record in the database for this userid, not...
13 Feb 2018 by OriginalGriff
Integers are probably not a good thing to use here: any fractional part of a result is discarded as they only hold whole numbers. So if you start with a deposit of 200, and interest of 10%, then: Year1 = 200 + (200 / 100 * 10) == 200 + (2 * 10) == 220 Year2 = 220 + (220 / 100 * 10) == 220 + (2 *...
21 Mar 2018 by CPallini
In addition to Richard suggestions, have a look at Painting in AWT and Swing[^].
24 Mar 2018 by CPallini
The compiler is correct. For instance: int digit11, digit22, digit33, digit44; //.. if ( digit1 onedigitnum) digit11 = digit1 % onedigitnum; //.. your code miss the inizialization of digit11 every time (digit1 ==...
24 Mar 2018 by Patrice T
Quote: and i dont relly know whats causing this and how to fix it Look at your code: what is the value of digit11 when (digit1 == onedigitnum) ? if (digit1onedigitnum) ...
28 Jun 2018 by Richard MacCutchan
String query="insert into hotelp (bno,name,phone,rno,rtype,days,perday,total) values ( '"+book+"','"+name+"','"+phone+"','"+rno+"','"+days+"','"+pday+"','"+total+"');"; A quick count of the number of column names and the number of variables shows that you do not have a value for rtype. If you...
15 Nov 2018 by Richard MacCutchan
Yes, because it is inside the 'false' section of an if/else/end clause, as you can clearly see in your code above. See #if, #elif, #else, and #endif Directives (C-C++)[^].
2 Nov 2020 by Gerry Schmitz
The problem is, you don't know how to write "generic" code. The "pattern" here is that you're using letters of the alphabet and you should be able to create a "loop" that steps through the alphabet and does it's thing with some "common letter...
8 Oct 2021 by OriginalGriff
First off, you are going to need a loop to enter values: Loops - Learn Python - Free Interactive Python Tutorial[^] - I'd suggest a while loop based on the result of the "Do you want to proceed?" question. Inside the loop, you add the prices to...
11 Nov 2022 by OriginalGriff
Without the relevant code - and I'm not going to wade through your entire project trying to guess which line might be giving you an error - we can't be specific. But this is generally an SQL INSERT problem: you are trying to INSERT more data...
16 Nov 2022 by OriginalGriff
Auto commit mode means that as soon as a statement is executed, Commit is called on the connection. At a guess - and I have no access to your system for testing - the setSchema call throwing an error probably means that the DB name...
10 May 2023 by mtoha
related to this post. can you downgrade / upgrade version of this library? maven-surefire-plugin You can search version here. You can try this : Here is the simplest way to resolve this error: 1) Go to your pom.xml file path 2) And...
20 Mar 2012 by Neha Thanka
hii am developing an application in netbeans.in that following error occured "package javax.servlet does not exist"this is the codepackage child;import java.sql.*;import java.io.*;import javax.servlet.ServletException;//error package javax.servlet does not exist import...
20 Mar 2012 by TorstenH.
You need to add the "Java-EE-Glassfish-V3" library to the project. That is done in the project's properties (right click on project).
26 Mar 2012 by DeepthiTanguturi
How to add wampserver to netbeans.i need steps.
26 Mar 2012 by Mellita
http://www.you...
9 May 2012 by ballerforeal
i have several java class with java swing component (GUI).i want to ask is there any IDE that can make it to become "drag and drop" design where i can editand add new swing component using drag and drop.im using netbeans.. but when i open the file there only source code..and how to...
10 May 2012 by TorstenH.
Whoever deleted it without further notice - there is a comment area underneath, you can add your concern there.I'm using Eclipse and - well, there are some WYSIWYG-Editors out there. But I can't really recommend them, as the code they produce is not really what I want to have. Overview...
20 May 2012 by jiji2663
hi everybodyi have jframe and a jtable jtable bind to table of databasei want to export this jatable to html fileI use netbeans 7.1 and MySQL 5please help methnx
19 May 2012 by jiji2663
hiI have a jframe and a jtable and i want bind the table to jtablehow can i do it?tnxi try this http://netbeans.dzone.com/news/binding-jtable-swing-controls-[^]but when i Click on "Import Data to Form..." show a error:"Importing data into a form in the default package is not...
3 Jun 2012 by anak_goblok
Hi guys, I have some problem with J2ME, the problem is,When using simulator in netbeans, saving date field to database is successfull, but when I instal it in my phone(nokia E-63) the date that saved into database not the 1 that I inputed in the date field, here my code part for date field...
3 Jun 2012 by Peter_in_2780
Try setting the timezoneprivate DateField currentDate= new DateField("Date :", DateField.DATE, TimeZone.getTimeZone(name of your timezone));Peter
7 Jun 2012 by TorstenH.
An *.so File is NOT a Java Library and can NOT be used as one.What is in that SO-File and why do you want to use it?
10 Jun 2012 by krumia
Have you tried this:java -Djava.library.path=I took this from here[]
4 Jul 2012 by amir tarek
i have just installed mysql server 5 and NetBeans 7.1 i want to know how to use java to connect to database on mysql server it is a code i found on net/* * To change this template, choose Tools | Templates * and open the template in the editor. */package...
4 Jul 2012 by TorstenH.
looks good spontaneous.When you get a ClassNotFound Exception - which class is not found? Please make sure that all parts are in the build:Configuring the build in Netbeans[^]
5 Jul 2012 by amir tarek
i am new in java programming i am trying it through windows platform and ubuntu platformin c, c++, c#, VB.Net the executable file is .exe i want to know what is the executable file for java is it .jar ? and if i want to run my program in my friend computer i only take the .jar...
5 Jul 2012 by TorstenH.
just to make sure you get all the exceptions:catch (ClassNotFoundException | InstantiationException | IllegalAccessException | SQLException e) catch (Exception e) { System.out.println(e.getMessage()); }otherwise you would miss some of them.Do you...
23 Jul 2012 by SachinCodes
I am relatively new to JavaFX ans Swings too. I just want to insert a stage into an TabbedPane. I tried inserting it in Java Swings but I get an error. Is it not possible to insert a Stage in a TabbedPane or in anr container for that matter? Please Help
23 Jul 2012 by _Amy
Hi,Forgot Googling[^]?Refer these links:http://java.dzone.com/articles/javafx-%E2%80%93-tabbed-pane-tab-panel[^]http://0divides0.wordpress.com/2010/10/21/movable-tabbed-panes-in-javafx/[^]--Amit
30 Jul 2012 by amir tarek
i want to make a simple program on my mobile using Java ME using netbeans when i tried to do this i made a simple program begin with login form and check the login data if right or wrongit opened on my device but i can not work with it because my phone is full touch phone NOKIA C6-01...
31 Jul 2012 by gediya84
Dear All,I want to Create Mozilla Thunderbird Addons any one give me a Steps for create application in any above selected langugae.Thanks & Regards
31 Jul 2012 by Sandeep Mewara
Look here:https://addons.mozilla.org/en-US/developer_faq[^]https://addons.mozilla.org/en-us/developers/docs/reference[^]
2 Aug 2012 by WajihaAhmed
Have you tested your app on DefaultFxTouchPhone emulator provided by the IDE? If it works on emulator then it must work on your device as well. I am preparing an app for full touch Nokia phone, and it works fine. Make sure your "pointerPressed(int x, int y)" function is overridden correctly.
6 Aug 2012 by TorstenH.
I'm with Rajesh - Derby rules! +5 for that.But I guess your google is broken and you are searching for this tutorial:Working with the Java DB (Derby) Database[^]
6 Aug 2012 by FoxRoot
try { //1.Kısım Baglantı Saglıyoruz this.host = "jdbc:derby://localhost:1527/EMRE"; this.Name = "emre"; this.Pass = "2561"; Connection con = DriverManager.getConnection(host,Name,Pass); //2.Kısım...
17 Aug 2012 by grmihel2
I'm quiet new in Netbeans IDE and PHP programming.At the moment I'm playing around with Google Maps programming, and how to set pins on locations stored in a database.Does anyone know if it possible, and how to do, to implement Maps v3 API into Netbeans IDE, so you can make purposals when...
19 Sep 2012 by Akkywadhwa
Hi everyone,I have written a code for retrieving contents of a windows partition "D:\" using recursion in java. Can anybody help me that why this from is not running. There is a NullPointerException shown as I involve that comment statement in code.import java.io.*;class...
19 Sep 2012 by Richard MacCutchan
Non valid answer removed by me.
19 Sep 2012 by Richard MacCutchan
Try changing your code to test for null values of b thus:File b[]=a.listFiles();if (b == null){ System.out.println("b is null"); return;}You will also note that your paths (in phase 1) do not include the drive letter prefix so when you recurse into a directory you try a search...
21 Sep 2012 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
22 Sep 2012 by Joan M
Let's see...You have to be much more specific...Show us your code, then possibly someone will be able to help.We don't know where you are stuck, where your problem is...With that, the best I can do is offer you a set of links that probably will help you:This will help...
7 Oct 2012 by FoxRoot
Hello everyone,I am developing a java application. I create a menu there are six buttons to operate different operations. The last button should open an html file which I created inside netbeans Developers.html. The name of buttons which is on the actual java application DEVELOPERS. I want...
21 Oct 2012 by FoxRoot
Hello everyone,I need to help about openning a html file under a Jbutton. I created a button on the panel and named it as tables. And I created a html file named as tables in the project folder. The program is expected to do this;When the user clicked on the butto, the html file should...
21 Oct 2012 by Thomas Daniels
Hi,Have a look at this similar discussion:http://stackoverflow.com/questions/4649816/open-local-html-page-java[^]
21 Oct 2012 by memealain1993
Define a CalendarClock class having the following variables:int minute (Range: 0-59)int hour (Range: 0-23)String dayOfWeek (possible values: “Sun”, ”Mon”, “Tue”, “Wed”, “Thu”, “Fri”, “Sat”)int day (Range: 1-31)Int month (Range: 1-12)int year (Range 1900-2100)Write a constructor...
21 Oct 2012 by Nelek
what have you tried?[^]Homework[^]
13 Nov 2012 by FoxRoot
String webpage="C:\\myRootFolder\\myWebPage.html";Runtime.getRuntime().exec("cmd /c start "+webpage);
18 Nov 2012 by manggz
i am writing a voting application on net beans please help
22 Nov 2012 by FoxRoot
I am developing a java project. That is served on the desktop not a web application. I just need ideas. Which DBMS is the best for netbeans. I am very new at java programming and database(I have no idea). I have started with JDBC(I dont know the exact name, the database inside netbeans :)) now I...