Just a guess but looking at the man for statfs I believe
the size is in blocks not bytes while df is bytes.
I think the solution is
myStatfs.f_bsize * myStatfs.f_bfree. ?
struct statfs {
u_int32_t f_flags; /* copy of mount flags */
int32_t f_bsize; /*...
Hi All
I'm triing to catch the output from a g++ command
from my ui. I'm using popen to get a file pointer
from which I read output. The catch is that this
works fine with regular shell commands like
"ps -ax\n" but with g++ the output goes to stderr.
As near as I can tell there is no...
Call dispose();
You also need to do
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
in case the user closes the dialog with the X button.
Usually in a constructor or int method.
It's not an error. It is a warning. It compiled successfully
but gave a warning that some of the methods you are using
are deprecated. That means they a marked to be dropped
from future versions of java.
Do what it says it you want details
recompile whith the deprecation flag.
javac -deprecation...
Actually you can enable the hyper links by providing
a listener. The editor pane has to be set to
pane.setEditable(false) in order for it to generate
events. Then make your app implement the
HyperLinkListener interface and provide a hyperLinkUpdate
method.
public void...
Yes but you have to take care of drawing it.
You need to subclass JPanel and override the
paint method. Also if it's a tile you need to take
care of drawing it multiple times to cover the whole
panel. If this is the case this should be done using
double buffering. (ie Drawing in memory and then...
You can use live connect to access some javascript on the
page to open a window and then write html to it.
http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm
import netscape.javascript.*;
public class myApplet extends Applet { public void init() {
JSObject win...
You can use a JEditorPane or a JTextPane to display
html pages. (like a browser) If there is any embedded
script or anything like that you need to use the browser
but for simple formatted html reports they're fine.
This way it displays as part of your app.
Should in fact be a database for permanent storage.
Inside your java app it should be an object
public class Employee
{
private String name, id, position;
private double salary;
public Employee(String name, String id, String position, double salary)
{
this.name=name;
this.id=id...
Easiest way I can think of is to start the app
with a batch file
set JAVA_HOME=C:\j2sdk1.4.0
c:\myApp.exe
This will work. If you want to see just open a dos
shell and type
set JAVA_HOME=C:\j2sdk1.4.0
then
echo %JAVA_HOME%
However this value will be gone as soon as you close the dos
window.
Also I just read this at javasoft
SAXParserFactory factory
= SAXParserFactory.newInstance();
factory.setValidating(validating);
parser = factory.newSAXParser();
Visual Age is in fact a good ide. Howerver they are
rather far behind in there support of new language features.
It does have code completion and all the other stuff you
mentioned and most important it has version control built
in so you don't need to implement a cvs repository or alike...
You can do it explicitly in your code so long as
you make sure to lug around the appropriate driver.
XMLReader xr = new org.apache.xerces.SAXDriver();
Then register all the usual handler stuff etc.........
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.