 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
beelzibub @ bawston schoo Guest
|
Posted: Thu May 17, 2007 3:58 am Post subject: Re: spinner help |
|
|
Ian Wilson wrote:
.... thx!!! i hope.
k
--
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom. |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat May 19, 2007 2:24 am Post subject: Re: Run jar utility to unpack a file in a directory w/spaces |
|
|
VogonP (AT) gmail (DOT) com wrote:
| Quote: | According to the jar syntax, I specify the archive from which the
files are to be extracted:
jar xvf <file
So -- what if the destination is c:\destination, but the source jar
file is in c:\Documents and Settings\mydir?
cd /d c:\destination
jar xvf c:\Documents and Settings\mydir\myjar.jar
yields
java.io.FileNotFoundException: c:\Documents (The system cannot find
the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:103)
at java.io.FileInputStream.<init>(FileInputStream.java:66)
at sun.tools.jar.Main.run(Main.java:185)
at sun.tools.jar.Main.main(Main.java:904)
jar xvf "c:\Documents and Settings\mydir\myjar.jar"
yields
The filename, directory name, or volume label syntax is incorrect.
I *can't* use unzip, which has the -d switch. Is there an equivalent
for jar? The docs seem to say no.
|
This is a Windows question, not a Java question.
To get Windows to recognize a pathname with embedded spaces, enclose the
pathname in double quotes:
jar xvf "c:\Documents and Settings\mydir\myjar.jar"
or even
jar xvf c:\"Documents and Settings"\mydir\myjar.jar
Ditto for any Windows command:
cd "c:\Documents and Settings\mydir"
--
Lew |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat May 19, 2007 2:31 am Post subject: Re: Head First JAVA |
|
|
pundit (AT) mail (DOT) com wrote:
| Quote: | I am looking for O'Reilly "Head First JAVA" free ebook. If you have
it, can you
please post a link from where I can download it?
|
If you are looking for "Head First Java" (not "JAVA"), by Sierra and Bates,
you can get it from:
<http://www.oreilly.com/catalog/hfjava2/>
who make it available online at
<http://safari.oreilly.com/0596009208>
Amazon Books has it:
<http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208>
I found these quickly via Google when I read your question.
What did you find?
--
Lew |
|
| Back to top |
|
 |
beelzibub @ bawston schoo Guest
|
Posted: Sat May 19, 2007 3:45 am Post subject: Re: my slider ?? |
|
|
Andrew Thompson wrote:
| Quote: | beelzibub @ bawston school for idiots wrote:
..
JSpinner alarm = (JSpinner) (evt.getSource());
..
any tips appreciated.
- Post compilable code.
- Add any compilation or error output received, or
failing that, a description of the actual as opposed
to expected behaviour.
- Ask a question (beyond the 'my slider??' in the sub. -
which makes no sense to me, as a question).
- Have a subject line that matches the components
mentioned. Is this about JSpinner or JSlider?
.... here is my code. it runs but without the spinner [which i always |
cAll slider <shrug>. i am doing this on my own for the knowledge so pls
no code but explations.
k>
| Quote: | /**
*
* @author kevin
*/
/**
* @(#)MyClock2.
*
*
* @Kevin
* @version 1.20 2007/4/20
*/
import java.text.*;
import java.text.ParseException;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Calendar.*;
import java.util.Date.*;
import java.io.IOException;
import javax.swing.*;
import javax.swing.SpinnerDateModel;
import javax.swing.event.*;
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;
import javax.swing.JSpinner.*;
abstract class BigFonts extends JComponent
implements MouseMotionListener, ActionListener,
ChangeListener
{
int newx=125, newy=95;
String st = " Starting ...";
public void paintComponent(Graphics g){
g.drawString(st, newx, newy);
}
//make draggable
public void MouseDragged(MouseEvent e){
// int newx =0;newy = 0;
newx=e.getX();
newy=e.getY();
repaint();
}
public static String doTime(String ts){
Calendar earliestdate, latestdate;
String thetime;
Calendar calendar = Calendar.getInstance();
SimpleDateFormat tf = new SimpleDateFormat( "h:mm:ss a" ) ;
thetime = tf.format(calendar.getTime());
return thetime;
}
public static void addToBox(String thetime){
// make text bigger for visually impaired friend
//ChangeListener listener;
String alarmTime;
Font big = new Font("Serif", Font.BOLD, 40);
JLabel msg = new JLabel("Time to go.");
JButton thedisplay = new JButton(thetime);
thedisplay.setFont(big);
thedisplay.setSize(400, 400);
// prepare alarm
JFrame display = new JFrame("Set the Alarm , please");
Calendar calendar = Calendar.getInstance();
// spinner model -- for setting alarm
Date presentTime = calendar.getTime();
Date earliestTime = calendar.getTime();
Date latestTime = calendar.getTime();
//SimpleDateFormat model = new SimpleDateFormat( "h:mm:ss a" ) ;
//model.format(calendar.getTime());
SpinnerDateModel model = new SpinnerDateModel(presentTime ,
null,
null,
Calendar.SECOND);
JSpinner alarm = new JSpinner(model);
alarm.setFont(big);
alarm.setFocusable(true);
alarm.setBackground(Color.blue);
alarm.setEditor (new JSpinner.DateEditor(alarm,"hh:mm:ss"));
alarm.setSize(500, 100);
alarm.setEnabled(true);
alarm.setVisible(true);
// put it all in a layout
display.setLayout(new FlowLayout());
display.setBackground(Color.CYAN);
display.setSize(100,30);
display.setFont(big);
display.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);;
display.add(thedisplay);
display.pack();
display.add(alarm);
display.pack();
display.setVisible(true);
}
// spinner action
public void stateChanged(ChangeEvent evt){
JSpinner tmp = (JSpinner) (evt.getSource());
tmp.setValue(tmp.getNextValue());
try {
tmp.commitEdit();
} catch (ParseException e) {}
}
public static void main(String[] args){
String theTime = " ";
String theAlarm = " ";
String st = " Starting ...";
Thread t = new Thread();
Calendar calendar = Calendar.getInstance();
t.start();
try{
for (; { // forever
addToBox(doTime(st));
t.sleep(1000);
//setalarm(theAlarm,theTime);
//setalarm
} // forever
}catch (Exception e){}
//{ who cares?)
}
}
|
--
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom. |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat May 19, 2007 3:50 am Post subject: Re: "Head First JAVA" |
|
|
pundit (AT) mail (DOT) com wrote:
| Quote: | Hello,
I am looking for O'Reilly "Head First JAVA". If you have it, can you
please post a link from where I can download it?
I greatly appreciate your help.
|
Here's the answer I gave over on comp.lang.java.help before I realized you had
multiposted your message.
Please do not multipost. It is very frustrating.
Lew wrote:
--
Lew |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat May 19, 2007 3:56 am Post subject: Re: "Head First JAVA" |
|
|
Lew wrote:
| Quote: | http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
I found these quickly via Google when I read your question.
What did you find?
|
I meant to also mention:
<http://www.oreilly.com/catalog/hfjava/>
and its online access
<http://safari.oreilly.com/0596009208>
--
Lew |
|
| Back to top |
|
 |
Guest
|
Posted: Sat May 19, 2007 6:44 am Post subject: Re: Head First JAVA |
|
|
On May 18, 5:31 pm, Lew <l...@nospam.lewscanon.com> wrote:
Thanks LEW,
But you missed the word "free ebook" and "download" !!!
~Thanks |
|
| Back to top |
|
 |
printdude1968@gmail.com Guest
|
Posted: Sat May 19, 2007 7:11 am Post subject: Re: Head First JAVA |
|
|
On May 18, 9:44 pm, pun...@mail.com wrote:
Good luck with that. You may be able to find what you are looking
for, but I doubt that it would be a legal version. Publishers and
authors don't take kindly to having versions of their books available
for free downloads. I know Bruce Eckle has some of the earlier
versions of his books available for free and they are legitimate. |
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Sat May 19, 2007 7:11 am Post subject: Re: my slider ?? |
|
|
printdude1968 (AT) gmail (DOT) com wrote:
...
| Quote: | ..I'm reading this on c.l.j.h via google and can only see the code
when I click on the "show quoted text". What's up with that?
|
Here it reads as..
k>
| Quote: | /**
*
[quoted text clipped - 156 lines]
}
|
Perhaps the OP's use of the leading '>' confused the
web interfaces to usenet, and possibly some news
clients, as well.
--
Andrew Thompson
http://www.athompson.info/andrew/
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-setup/200705/1 |
|
| Back to top |
|
 |
printdude1968@gmail.com Guest
|
Posted: Sat May 19, 2007 7:11 am Post subject: Re: my slider ?? |
|
|
On May 18, 6:45 pm, "beelzibub @ bawston school for idiots"
<comprehensivecenter> wrote:
| Quote: | Andrew Thompson wrote:
beelzibub @ bawston school for idiots wrote:
..
JSpinner alarm = (JSpinner) (evt.getSource());
..
any tips appreciated.
- Post compilable code.
- Add any compilation or error output received, or
failing that, a description of the actual as opposed
to expected behaviour.
- Ask a question (beyond the 'my slider??' in the sub. -
which makes no sense to me, as a question).
- Have a subject line that matches the components
mentioned. Is this about JSpinner or JSlider?
... here is my code. it runs but without the spinner [which i always
cAll slider <shrug>. i am doing this on my own for the knowledge so pls
no code but explations.
k
/**
*
* @author kevin
*/
/**
* @(#)MyClock2.
*
*
* @Kevin
* @version 1.20 2007/4/20
*/
import java.text.*;
import java.text.ParseException;
import java.awt.*;
import java.awt.event.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.Color;
import java.awt.Font;
import java.awt.GridLayout;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.Calendar.*;
import java.util.Date.*;
import java.io.IOException;
import javax.swing.*;
import javax.swing.SpinnerDateModel;
import javax.swing.event.*;
import javax.swing.event.ChangeListener;
import javax.swing.event.ChangeEvent;
import javax.swing.JSpinner.*;
abstract class BigFonts extends JComponent
implements MouseMotionListener, ActionListener,
ChangeListener
{
int newx=125, newy=95;
String st = " Starting ...";
public void paintComponent(Graphics g){
g.drawString(st, newx, newy);
}
//make draggable
public void MouseDragged(MouseEvent e){
// int newx =0;newy = 0;
newx=e.getX();
newy=e.getY();
repaint();
}
public static String doTime(String ts){
Calendar earliestdate, latestdate;
String thetime;
Calendar calendar = Calendar.getInstance();
SimpleDateFormat tf = new SimpleDateFormat( "h:mm:ss a" ) ;
thetime = tf.format(calendar.getTime());
return thetime;
}
public static void addToBox(String thetime){
// make text bigger for visually impaired friend
//ChangeListener listener;
String alarmTime;
Font big = new Font("Serif", Font.BOLD, 40);
JLabel msg = new JLabel("Time to go.");
JButton thedisplay = new JButton(thetime);
thedisplay.setFont(big);
thedisplay.setSize(400, 400);
// prepare alarm
JFrame display = new JFrame("Set the Alarm , please");
Calendar calendar = Calendar.getInstance();
// spinner model -- for setting alarm
Date presentTime = calendar.getTime();
Date earliestTime = calendar.getTime();
Date latestTime = calendar.getTime();
//SimpleDateFormat model = new SimpleDateFormat( "h:mm:ss a" ) ;
//model.format(calendar.getTime());
SpinnerDateModel model = new SpinnerDateModel(presentTime ,
null,
null,
Calendar.SECOND);
JSpinner alarm = new JSpinner(model);
alarm.setFont(big);
alarm.setFocusable(true);
alarm.setBackground(Color.blue);
alarm.setEditor (new JSpinner.DateEditor(alarm,"hh:mm:ss"));
alarm.setSize(500, 100);
alarm.setEnabled(true);
alarm.setVisible(true);
// put it all in a layout
display.setLayout(new FlowLayout());
display.setBackground(Color.CYAN);
display.setSize(100,30);
display.setFont(big);
display.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);;
display.add(thedisplay);
display.pack();
display.add(alarm);
display.pack();
display.setVisible(true);
}
// spinner action
public void stateChanged(ChangeEvent evt){
JSpinner tmp = (JSpinner) (evt.getSource());
tmp.setValue(tmp.getNextValue());
try {
tmp.commitEdit();
} catch (ParseException e) {}
}
public static void main(String[] args){
String theTime = " ";
String theAlarm = " ";
String st = " Starting ...";
Thread t = new Thread();
Calendar calendar = Calendar.getInstance();
t.start();
try{
for (; { // forever
addToBox(doTime(st));
t.sleep(1000);
//setalarm(theAlarm,theTime);
//setalarm
} // forever
}catch (Exception e){}
//{ who cares?)
}
}
--
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom.
|
Ok, I'm reading this on c.l.j.h via google and can only see the code
when I click on the "show quoted text". What's up with that? |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Sat May 19, 2007 6:59 pm Post subject: Re: Head First JAVA |
|
|
printdude1968 (AT) gmail (DOT) com wrote:
| Quote: | On May 18, 9:44 pm, pun...@mail.com wrote:
On May 18, 5:31 pm, Lew <l...@nospam.lewscanon.com> wrote:
pun...@mail.com wrote:
I am looking for O'Reilly "Head First JAVA" free ebook. If you have
it, can you
please post a link from where I can download it?
If you are looking for "Head First Java" (not "JAVA"), by Sierra and Bates,
you can get it from:
http://www.oreilly.com/catalog/hfjava2/
who make it available online at
http://safari.oreilly.com/0596009208
Amazon Books has it:
http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
I found these quickly via Google when I read your question.
What did you find?
--
Lew
Thanks LEW,
But you missed the word "free ebook" and "download" !!!
~Thanks
Good luck with that. You may be able to find what you are looking
for, but I doubt that it would be a legal version. Publishers and
authors don't take kindly to having versions of their books available
for free downloads. I know Bruce Eckle has some of the earlier
versions of his books available for free and they are legitimate.
|
Besides, I didn't "miss" the "free ebook" part - I disregarded it. As you
say, printdude1968, it wouldn't be legal. I was totally making the point that
the OP should /pay/ for their book.
Hey, pundit, I didn't "miss" that part. It was part of my communication to
you to show you where to /pay/ for your book. Furthermore, if you had
actually /looked/ at the links I sent, you'd've seen that Safari /is/ free for
the trial period. You could read the book then cancel. So there.
Now stop being so cheap. And please do not multipost.
--
Lew |
|
| Back to top |
|
 |
beelzibub @ bawston schoo Guest
|
Posted: Sun May 20, 2007 3:32 am Post subject: Re: Head First JAVA |
|
|
Lew wrote:
| Quote: | printdude1968 (AT) gmail (DOT) com wrote:
On May 18, 9:44 pm, pun...@mail.com wrote:
On May 18, 5:31 pm, Lew <l...@nospam.lewscanon.com> wrote:
pun...@mail.com wrote:
I am looking for O'Reilly "Head First JAVA" free ebook. If you have
it, can you
please post a link from where I can download it?
If you are looking for "Head First Java" (not "JAVA"), by Sierra and
Bates,
you can get it from:
http://www.oreilly.com/catalog/hfjava2/
who make it available online at
http://safari.oreilly.com/0596009208
Amazon Books has it:
http://www.amazon.com/Head-First-Java-Kathy-Sierra/dp/0596009208
I found these quickly via Google when I read your question.
What did you find?
--
Lew
Thanks LEW,
But you missed the word "free ebook" and "download" !!!
~Thanks
Good luck with that. You may be able to find what you are looking
for, but I doubt that it would be a legal version. Publishers and
authors don't take kindly to having versions of their books available
for free downloads. I know Bruce Eckle has some of the earlier
versions of his books available for free and they are legitimate.
Besides, I didn't "miss" the "free ebook" part - I disregarded it. As
you say, printdude1968, it wouldn't be legal. I was totally making the
point that the OP should /pay/ for their book.
Hey, pundit, I didn't "miss" that part. It was part of my communication
to you to show you where to /pay/ for your book. Furthermore, if you
had actually /looked/ at the links I sent, you'd've seen that Safari
/is/ free for the trial period. You could read the book then cancel.
So there.
Now stop being so cheap. And please do not multipost.
.... remember your blood pressure. |
b
--
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom. |
|
| Back to top |
|
 |
Lew Guest
|
Posted: Mon May 21, 2007 6:58 pm Post subject: Re: Serial number |
|
|
tardas wrote:
| Quote: | i want to generate a number that is unique for a machine.
I decided to get hdd serial. But i have to find more than that.
which hardware numbers can i take? how?
|
Please do not multi-post (the placement of the same message independently in
multiple newsgroups). It fragments the thread and frustrates folks who are
trying to help you.
If you absolutely feel the overwhelming need to reach multiple groups, which
you shouldn't usually, then cross-post (place the same message into multiple
groups at once using multiple addresses on the same copy of the message so
that all replies are seen by all groups).
Usually it's better to pick the one group that fits. Read the groups' FAQs.
--
Lew |
|
| Back to top |
|
 |
tardas Guest
|
Posted: Mon May 21, 2007 7:09 pm Post subject: Re: Serial number |
|
|
On 21 Mayıs, 16:58, Lew <l...@nospam.lewscanon.com> wrote:
| Quote: | tardas wrote:
i want to generate a number that is unique for a machine.
I decided to get hdd serial. But i have to find more than that.
which hardware numbers can i take? how?
Please do not multi-post (the placement of the same message independently in
multiple newsgroups). It fragments the thread and frustrates folks who are
trying to help you.
If you absolutely feel the overwhelming need to reach multiple groups, which
you shouldn't usually, then cross-post (place the same message into multiple
groups at once using multiple addresses on the same copy of the message so
that all replies are seen by all groups).
Usually it's better to pick the one group that fits. Read the groups' FAQs.
--
Lew
|
thanx lew. i know how to use groups. |
|
| Back to top |
|
 |
Andrew Thompson Guest
|
Posted: Tue May 22, 2007 7:11 am Post subject: Re: Facebook bot |
|
|
On May 22, 12:18 pm, "mfasoc...@gmail.com" <mfasoc...@gmail.com>
wrote:
| Quote: | Hey guys I'm writing a facebook bot program.
|
What a coincidence, there's somebody over
on c.l.j.help trying to do the same thing!
Oh.. that's you. Please refrain from
multi-posting.
<http://www.physci.org/codes/javafaq.html#xpost>
As an aside, <http://www.facebook.com/terms.php>
under "Proprietary Rights in Site Content;
Limited License" states "..Such license is subject
to these Terms of Use and does not include use of
any data mining, robots or similar data gathering
or extraction methods. .."
(X-post to c.l.j.p./h., w/ f-u to c.l.j.p. only)
Andrew T. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|