Posts
 
Reputation
Loading chart. Please wait.
Joined
Last Seen
Ranked #4K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
1 Commented Post
0 Endorsements
Ranked #2K
~22.9K People Reached
Favorite Tags

24 Posted Topics

Member Avatar for Zibo

Hello. I'm trying to add a single test record (a comment item) to my MySQL database. So here are my sources of JSF2 project. - main xhtml page: [code]<h:body> <h:panelGroup id="mainBlock" layout="block"> <h:panelGroup id="header" layout="block"> <h:graphicImage value="resources/logo.jpg" style=""/> </h:panelGroup><br/> <h:panelGroup id="menu" layout="block"> <h:panelGrid columns="1" style=""> <h:outputLabel value="MENU" style=""/> <br/> <h:form> …

0
90
Member Avatar for Zibo

Hello. I'm trying to add a single test record (a comment item) to my MySQL database. So here are my sources of JSF2 project. - main xhtml page: [code]<h:body> <h:panelGroup id="mainBlock" layout="block"> <h:panelGroup id="header" layout="block"> <h:graphicImage value="resources/logo.jpg" style=""/> </h:panelGroup><br/> <h:panelGroup id="menu" layout="block"> <h:panelGrid columns="1" style=""> <h:outputLabel value="MENU" style=""/> <br/> <h:form> …

Member Avatar for Zibo
0
133
Member Avatar for Zibo

Hello! Here's the problem: After making some GUI application (NetBeans) in output directory (containing generated .jar file) also appeared a directory 'lib' with additional .jar. This jar is some extra library with classes, which path is added in manifest ("Class-Path: lib/bla.jar"). So I've used to pack my applications always intto …

Member Avatar for Zibo
0
186
Member Avatar for Zibo

Hello. I'm trying to write an application, which after pressing a key does a particular action. The thing is I need the application to receive key events even if JFrame isn't itself focused (is iconified). I've read somewhere that it cannot be done - is that true? If it is …

Member Avatar for quuba
0
2K
Member Avatar for Shaun1987

I believe, that during those 3 years he managed to add those buttons... But I see You are making sure that he did.

Member Avatar for anand008
0
1K
Member Avatar for f.damati

Use JTextArea methods append(String str) or setText(String str). Nothing big.

Member Avatar for javaAddict
0
178
Member Avatar for kimbirdy09

I understand You have a problem with menu to Your program, where You can choose a number and something happens. You can use for this task BufferedReader class, which initialization look like that: [code=Java]BufferedReader br = new BufferedReader( new InputStreamReader( System.in ) );[/code] For reading a number from user is …

Member Avatar for Zibo
0
100
Member Avatar for soultrav
Member Avatar for grisha83

[code=Java]public IntNode createList(int n) { while(head== null){ head = new IntNode(n, head); } head.addNodeAfter(n); // <------ return head; }[/code] In marked line after You created a head, You create head again and add it as link to head... Delete this line and should be fine. Also instead of loop here, …

Member Avatar for grisha83
0
91
Member Avatar for Zibo

Hello. I've got simple JFrame and into that I put JPanel (object of subclass of JPanel class). I want to check, what's this panel's size from inside of this panel class, but every method (getSize, getBounds) returns [0,0]. If I call getSize method from JFrame class, then it's fine, but …

Member Avatar for Zibo
0
191
Member Avatar for ramborambo

[QUOTE=ramborambo;866974]int[] values = new int[10]; values[ 10 ] = 0;[/QUOTE] Huge amount of code so far ^_^. IndexOutOfBoundsException You get here. Remember that, then int You pass in constructor is the number of elements, not the maximum index You can put element on. Remember that: new int[ length ] => …

Member Avatar for BestJewSinceJC
0
129
Member Avatar for lazarus_5

[code=java]import java.awt.event.* import javax.swing.*;[/code] 1. No semicolon on the end of 1st import. 2. You add imports only on the top of document, not in the middle. In the middle are 'class', interfaces or enum expected'. PS. [url]http://www.daniweb.com/forums/announcement9-3.html[/url]

Member Avatar for BestJewSinceJC
0
118
Member Avatar for bluerose

2 things about that part: [code=java] if(e.isControlDown() && e.getKeyCode() == 10){ String strBefore = txtArea.getText(); txtArea.setText(strBefore+"\n");[/code] [b]1.[/b] Using Ascii numbers to check if key is pressed is not a nice way to check it - makes it unreadable without ascii char table in front of Your eyes. Instead use KeyEvent's …

Member Avatar for bluerose
0
357
Member Avatar for Q8iEnG
Member Avatar for Zima77

Hm, I can't see anywhere a method writeOutput, which takes those 3 arguments... But if You say that first argument should be passed as a Person object, then You have to create an instance of Person class and then pass it through Your method: [code=Java]Person nick = new Person("Nick"); honda.writeOutput( …

Member Avatar for Zibo
0
419
Member Avatar for Zibo

Hello. I've got such example statement: [code=Java]for( int i=0; i <= 10000; i++ ) myTextArea.setText( myTextArea.getText()+ i + "\n");[/code] What is the problem? I can't figure it out, why in every iteration of loop the text area isn't refreshing with new String added. When this loop is iterating, app freezes …

Member Avatar for Zibo
0
131
Member Avatar for javaman2

Write on paper a set like a { 3,7,-1,5 } and make Your for loop on that. Notice, that iterating only 1 time on whole set is not enough. Most primitive version of bubble sort is making such iteration n-times. (where n is the number of elements)

Member Avatar for blumen
0
369
Member Avatar for trace63b

Using comparison [code=Java]string1 > string2[/code] is illegal in Java. To compare Strings You use compareTo method of String class: [code=Java]string1.compareTo( string2 ) > 0[/code] what would be in illegal way: [code=Java]string1 > string2[/code]

Member Avatar for trace63b
0
190
Member Avatar for ahoest

Instead of using 2 arrays of Point objects, I suggest ArrayList<Line2D> class, so deleting particular line won't leave a 'hole' in array. Initialization of object Lin2D's class looks like that: [code=Java]Line2D line = new Line2D.Double( arguments );[/code] You paint it in 'paint' method ( or paintComponent? ) by: [code=Java]Graphics2D g2d …

Member Avatar for ahoest
0
4K
Member Avatar for Laidler

Well, I think that: [code=Java]@Override public String toString() { if( power ) return "Power: On"; else return "Power: Off"; }[/code] EDIT: Oh, I'm too late. :)

Member Avatar for BestJewSinceJC
0
1K
Member Avatar for Zibo

Hello! I'm searching and searching and can't find a solution... In my project I've got a folder 'Images' where from my application loads icons etc. Running project from IDE (NetBeans) it's of course working fine, but I want to create stand-alone application, so I create .jar file. And here's a …

Member Avatar for BestJewSinceJC
0
178
Member Avatar for peedi

What You are asking is written above: [code]//using a for loop, check if the number has been used before //if it has been used before, do nothing //if it has not been used before, put it in array[number_filled] and increment number_filled by one. (Add one to it)[/code] In Java language: …

Member Avatar for BestJewSinceJC
0
5K
Member Avatar for Seamus McCarthy

For first: why do You call Collections.binarySearch(...), when You already iterate through Your dvd store? If You encounter dvd, that's title equals to searched title, You already have its index ( -> i ), so binarySearch is not needed here. For second: You'll get "Not found Dvd Object" message every …

Member Avatar for Seamus McCarthy
0
187
Member Avatar for gotm

It's because You didn't create an instance of Your 'choices' variable. You need to allocate a memory by adding a line (in constructor i.e.): [code]choices = new Vector<String>();[/code] Oh, and I think You don't have to catch 3 times still one type of exception one after another. Remove 2 of …

Member Avatar for Zibo
0
139