I'm looking for a place to hook some code to programmatically create, size and position a JPanel after the application has finished loading.
I'm just starting with Java. I'm using NetBeans 6.5.1 with jdk1.6.0_13. I've used the new project wizard to create a basic Java/Swing desktop application. This is a SingleFrameApplication that uses...
Hi,
The other day this code was working. I changed some things and re-ran it and now it doesn't work as intended. Obviously something I changed altered the behaviour, but I have gone back and reverted all of those changes and it still doesn't work. Disregarding that bit of information (to start), why the hell does this code not place a ...
So lets say I have an N sized server array set up like so:
I have a simple JavaBean/POJO:
package example;
public class Person {
private OtherObject obj;
public void setObj(OtherObject theObj) {
synchronized (this) {
obj = theObj;
}
}
public OtherObject getObj() {
synchronized (this) {
return obj;
...
I'm working on a Java decompiler with correctness(*) as a primary design goal. To test it, I'm looking for some Java Open Source projects with fine-grained unit test coverage. These projects can be large or small, but test should exist which cover individual classes or methods. I plan to compile these projects with various compilers/s...
I need to deploy only the referenced classes in a very limited environment as A data carousel for Interactive TV. Bandwidth is expensive and .jar files are not supported.
...
I send WAV files using a client and server, but I want to play the WAV when it received. I try this method but it did not work:
Runtime.getRuntime().exec("C:\\Documents and Settings\\Administratore\\Desktop\\gradpro\\test1\\s1.wav") ;
This the exception that I get:
"Error! It didn't work! java.io.IOException: Cannot run progr...
Annoyingly, Google App Engine has become another one of those projects where they only release plugins for Eclipse (like Spring Webflow) and I just much prefer IntelliJ. Can you run the local test environment successfully with IntelliJ? And debug/deploy a local or live application? If so, are there any features missing that are in the Ec...
I'm using dom4j's rules api to fire an action if the predefined pattern //authorize matches an element in the following xml snippet.
<authorize role_required="admin">
<node title="node which is visible only to admin" path="" >
<authorize role_required="admin">
<node title="node which is visible only to admin" path=""/>
...
Hi
I use matlab in my project and I want to retrieve the result of matlab in java. Just I want the result.
I want to retrive result of file that I make it in matlab in the java.
I use this code but it give me the result in matlab windo and I want only to retrive the result in java only.
this is the code
public class matlab {
priva...
I've been Googling and checking on Stack Overflow and nothing has helped... hopefully someone can.
I usually just write my code by hand, but I'm working on a Java project that has a GUI aspect and I like what MiG Layout has to offer so I want to use it. I've downloaded the .jar file from the website, but I can't seem to be able to acces...
I am trying to use the myType class declared in the package
com.mycompany.myproject in a class that lives in
com.mycompany.myproject.client but I am getting the following errors
when compiling:
[ERROR] Line [X]: The import com.mycompany.myproject.myType cannot be
resolved
If I try to run the hosted browser I get:
[ERROR] Line [X]: No ...
I just recently discovered that you can specify multiple types in a single type parameter bound (see example). Like any new tool, I've been trying to explore the possibilities of how this can be used (and misused). I crafted this example to help illustrate.
On the sample below, the compiler is giving me an error
dispatch(new Alphab...
My teacher gave out a practice exam on java recently and I'm curious to see how I did on the true/false part. I'm least confident about number one, so any explanation there would help a lot.
In Java, a class can extend any number of abstract classes.
false. I don't quite understand why, is it just because in an inheriting class the...
Perhaps a philosophical question. I’ve seen some interesting visuals lately in GUIs, mostly on native platform APIs. I know that “it’s just software” and that likely, with enough work, anything can be done with pixels. The question is (finally!), is Java really an option for doing fancy things with a GUI. Seems like a silly thing I g...
I've been designing an application, based on .NET/Mono framework, which should make an heavy use of the shortest-path in a graph theories and I would like to use a native solution to traverse the nodes of the graph, instead of implementing surrogate solutions which would be hardly maintainable and would massively affect performances.
I'...
Given the following Hello World servlet, how could you transfer the Hello World output out of the servlet code and put it in some kind of HTML templating format? I would like to simply call the template from the servlet and have it render the Java variables I refer to in the template - perhaps by referring to the "Hello World" string as ...
Hi people.
My question is very basic, but I didn't find an answer on a Google search.
In Java, ¿what is the maximum size a String object may have, referring to the length() method call?
I know that length() return the size of a String as a char [ ]
...
I'm setting up a GUI where I need to take information inputted from form elements and manipulate the information. This requires me to use some elements to access others.
For example, I have an input box (JTextField) and a button (JButton) beside it. When the button is pressed, I need to be able to manipulate the text entered into the in...
so i made a circle class that sets the radius, and should output the radius, circumference and area however, if i input the radius, the radius, circumference, area wont output back, it just shows as 0.0
heres my Circle.java
public class Circle
{
private double radius;
private double PI = 3.14159;
public void setRadius(doubl...
I have written a class that extends JPanel. Is it possible to use this in the NetBeans GUI Builder and have it survive all of the automatic code generation?
I have used the customised code option in the GUI builder to instantiate the object as the new class, but it seems like the declaration can't be changed from JPanel, so only method...