 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- What's the secret to using JSeparator?The API documentation for JSeparator says that, besides using it in menus, it
can be used "elsewhere in a GUI wherever a visual divider is useful." I have
never been able to use it (show a visible divider) except in a menu. Anyone
know the "secret of the separator"?
A short, contrived example follows:
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
public class SeparatorTest extends JFrame
{
public SeparatorTest( )
{
setTitle( "SeparatorTest" );
setSize( 200, 200 );
setLocationRelativeTo( null );
JPanel pnlCenter = new JPanel();
pnlCenter.add( new JLabel( "Last Name: " ) );
pnlCenter.add( new JTextField( 8 ) );
pnlCenter.add( new JLabel( "First Name: " ) );
pnlCenter.add( new JTextField( 8 ) );
JSeparator sep = new JSeparator( JSeparator.HORIZONTAL );
pnlCenter.add( sep );
pnlCenter.add( new JButton( "OK" ) );
pnlCenter.add( new JButton( "Exit" ) );
add( pnlCenter );
}
public static void main(String[] args)
{
SeparatorTest app = new SeparatorTest();
app.setVisible( true );
}
}
Lee Weiner
lee AT leeweiner DOT org
- 1
- Eclipse : edit code using drag & drop ?Patrick, Isn't eclipse cool?! A little more context from your
question, that is, from what perspective? Developing applets? JSP
pages? M7 develops NitroX for JSP and Struts which provides an
integrated synchronized source and visual editor. www.m7.com.
email***@***.com wrote in message news:<email***@***.com>...
> After a few months of working with Eclipse, I'm almost 100%
> happy with it, but the one feature i'm (still) missing is the ability
> to edit source-code using drag & drop ...
>
> Does anyone know if there's some way (maybe a plugin) to make
> this possible ? (I've already googled on it, to no avail).
- 2
- GridLayoutHello all!
I have a jpanel to which I have set a layout of GridLayout(0,1,10,10).
Within this panel I have 3 ImageIcons.
When I startup the application, the ImageIcons are spread out evenly
using the available space, and when I resize it, the hgaps and vgaps
are respected, and the ImageIcons moved according to the panel size.
But...
I do not want the 3 components to use all available space.
I want them to be aligned at the center top of the JPanel, and that
when the application is resized, the hgap/vgap sizes remain the same,
and that instead of occupying all avalable JPanel space, the ImageIcons
only occupy their own X,Y position according to their height and
hgap/vgap....
- Can I do this using GridLayout? (or any existing layout) ?
- Am I clear enough or am I loosing myself in rambling explanations?
TIA,
Soch
- 3
- Layout ManagersRoedy Green coughed up:
> On Fri, 28 Oct 2005 01:58:18 GMT, "Thomas G. Marshall"
> <email***@***.com> wrote, quoted
> or indirectly quoted someone who said :
>
>> No, I think you mean "integer multiples" here. Pixels, for example,
>> could
>> easily be drawn 3:1. But it's still the wrong solution.
>
> Yes. That applies to shrinking too which is even more problematic.
...[rip yada...]...
I was part of a postscript clone manufacturer. I am intimate with all
details regarding it's developement and design, particularly AA and pixel
alignment ramifications.
The only thing I can imagine is (believe it or not) that a general purpose
PDL such as postscript is beyond the abilities of most to implement. This
is true to a large extent---take a look at how many postscript clones that
would work and then gack on particular pages. Or not work at all. There
were a great many joke interpreters. I haven't checked in a while, but
gnu's ghostscript was certainly one of them for many years.
--
http://www.allexperts.com is a nifty way to get an answer to just about
/anything/.
- 4
- java doc start!?Hi
I hear about Java document.. jar files etc. I want to learn these subjects..
what do you think would be a good start.. I want to start with something so
basic and simple so I can understand what is going on, then go to sun
tutorial or any other advanced tutorials. Thanks.
- 6
- ejbcreate and ConstructorHi,
I am just learning EJB. Sorry if I am asking a stupid question.
It is required that a session bean should have a public no-argument
constructor. However, the initialization is usually done inside the
ejbcreate() method.
Could I put the initialization code in the constructor instead of
ejbcreate()?
TIA.
SF
- 6
- problem w/conditional...
I'm learning java.. following an assignment given to me by a programmer
at work I put together a little app that:
when you first run it it types a string, then prompts user to type part
of the string, and app returns sgmt of string user typed surrounded by
two chars before and after sgmt user typed..
I put a few lines in there to deal with when user types first two chars
of string, but what happens is not what I specify... pls see code here..
www.francesdelrio.com/java/string.html
lines in question near bottom of code..
(signaled with " //*************...") thank you..
Frances
- 6
- EJBs vs. Servlets ?!Hello,
When someone should be using EJBs and when servlets ?
Are servlets just the Sun's lost children ?! They were just an
intermediate step before EJBs came out ?
The only reason I see to use servlets instead of EJBs is if do not
have an application server (like JBOSS).
Are there any other reasons ? (like performance, development time &
effort etc)
Regards,
Razvan
- 6
- OPIE or SKEY authentication on web applicationHello,
I am looking for a free and opensource component to do an OTP
authentication on a web application running on Linux/Apache/Tomcat.
JAVA API would be nice but any information is welcome.
Pierre
- 6
- Simple question about instantiatingHi,
I am a little bit confused with how OOP works with respect to instantiating.
For example take the following code below. When each of the 10 c1 objects
are instantiated from the CountTest() class, do they not each have their own
instanceCount class variable??? It does not seem to be so from this code
that I took from a book. In my thinking every time an object is created it
initializes the instanceCount class variable to 0 and therefore the count
would always be 1 after the constructor is run and the instanceCount is
incremented. Can someone clarify what actually happens behind the scenes
when an object is instantiated with the class variables.
TIA
Roy
public class CountTestApp
{
public static void main(String[] args)
{
printCount();
for (int i =0; i < 10; i++)
{
CountTest c1 = new CountTest();
printCount();
}
}
private static void printCount()
{
System.out.println("There are now " + CountTest.getInstanceCount() +
" instances");
}
}
class CountTest
{
private static int instanceCount = 0;
public CountTest()
{
instanceCount++;
}
public static int getInstanceCount()
{
return instanceCount;
}
}
- 11
- differense of look between 1.4.2 and 1.4.1Hello,
when compiling and running with jdk 1.4.2 (or higher) the look is totally
different then when i use 1.4.1 fe mouse over on buttons seems different,
the look of the radiobuttons is different , how can i solve this
fe how i call a button
trashbutton.setIcon(new ImageIcon(images.getString("TRASH20")));
trashbutton.setPressedIcon(new
ImageIcon(images.getString("TRASH20_IN")));
trashbutton.setRolloverIcon(new
ImageIcon(images.getString("TRASH20_OUT")));
trashbutton.setDisabledIcon(new
ImageIcon(images.getString("TRASH20_DIS")));
trashbutton.setToolTipText(recources.getString("REMOVE_NODE"));
trashbutton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
EditRemoveMenuItem_actionPerformed(e);
}
});
trashbutton.setFocusPainted(false);
trashbutton.setBorderPainted(false);
trashbutton.setMaximumSize(new Dimension(40, 40));
trashbutton.setMinimumSize(new Dimension(40, 40));
trashbuttons.etPreferredSize(new Dimension(40, 40));
trashbutton.setBackground(new Color(15, 40, 70));
trashbutton.setForeground(new Color(15, 40, 70));
it seems when i go with the mouse over the buttons in jdk 1.4.2 the
backgroundcolor disapears and i need to set for mouseover also a color
or are there other parameters to set
there are also border that appears around the buttons on jdk 1.4.2 and not
on lower versions
can i find any solutions about this on the net?
thanks Sven
- 11
- JBuilder applet, JarI have simple applet which uses classes like java.util.AbstractList,
java.awt.Point. Its fine in builder IDE, problems starts with MS VM.
There are IO exceptions about above classes, VM is looking for those
classes in my JAR, how can i add it to JAR in JBuilder and from where
can i take it? I have no idea. Any help apreciated...
- 11
- How this is possible?if (mySocket != null){ logger.log(Level.FINEST,"Connection
Status" + mySocket.isClosed() + mySocket.isConnected()); }
When I see the log isClosed() and isConnected() are both returning
true??? Anybody has an explanation for this?
- 11
- Java was created in SODOM and GOMORRAH !!!!JAVA was written by SATAN in SODOM with help of the ANTICHRIST
in GOMORRAH !!! DEMONS added a lot of BLASPHEMY and HERETICS and
WITCHES tons of pure SIN !!!! That makes JAVA extremly EVIL and
UNHOLY !!!!
If you want to use JAVA, you need HOLY WATER, a BIBLE and a
CRUCIFIX and only experienced EXORCISTS can master JAVA !!!!
- 15
- JTextArea fun...Hi,
I am wanting to have an area of text which will take in sets of
coordinates and display them straight away. Initially, i used a
JTextArea and simply used the .append() method to add the newest
coordinates to the end of the current text. This worked perfectly fine.
However, my problem now is that i want, at some points, one set of
coordinates to display in a different colour to the rest. I.e. The
selected object would have its coordinates highlighted in the text
area. Due to the fact that .setForeground() changes the colour of the
entire contents of the JTextArea; i need to use something else. I have
tried using a JTextPane but cannot work out how to make it append extra
information like the JTextArea does.
Does anybody have any suggestions on what i could use to 1) display
text as i add new objects and 2) have the ability to have different
coloured text. Cheers.
Regards,
Cassman
|
| Author |
Message |
Darryl L. Pierce

|
Posted: 2003-12-25 5:08:00 |
Top |
java-programmer, Happy Xmas!
Hope everybody who celebrates has a wonderful holiday, and that all have a
good vacation day! :)
--
Darryl L. Pierce <email***@***.com>
Visit the Infobahn Offramp - <http://mypage.org/mcpierce>
"What do you care what other people think, Mr. Feynman?"
|
| |
|
| |
 |
Michiel Konstapel

|
Posted: 2003-12-25 8:58:00 |
Top |
java-programmer >> Happy Xmas!
> Hope everybody who celebrates has a wonderful holiday, and that all have
> a good vacation day! :)
Thanks Darryl :)
To you and everyone else who reads the group, my best wishes!
Michiel
|
| |
|
| |
 |
Andrew Thompson

|
Posted: 2003-12-25 11:59:00 |
Top |
java-programmer >> Happy Xmas!
"Darryl L. Pierce" <email***@***.com> wrote in message
news:email***@***.com...
> Hope everybody who celebrates has a wonderful holiday, and that all have a
> good vacation day! :)
Well _I_ was resisting doing this, but you
have opened the (flood) gates now Darryl!
http://www.physci.org/test/xmas/ :-)
[ And apologies in advance - it is horrendously
'IE' oriented - using the <bgsound> tag!]
|
| |
|
| |
 |
HGA03630

|
Posted: 2003-12-25 17:30:00 |
Top |
java-programmer >> Happy Xmas!
"Andrew Thompson" <email***@***.com> wrote in message news:<qgtGb.64605$email***@***.com>...
> "Darryl L. Pierce" <email***@***.com> wrote in message
> news:email***@***.com...
> > Hope everybody who celebrates has a wonderful holiday, and that all have a
> > good vacation day! :)
>
> Well _I_ was resisting doing this, but you
> have opened the (flood) gates now Darryl!
>
> http://www.physci.org/test/xmas/ :-)
>
> [ And apologies in advance - it is horrendously
> 'IE' oriented - using the <bgsound> tag!]
I could hear your MIDI on Mozilla/Linux. It's beauifully arranged.
But X'mas is nothing for us orientals. I respect words from Jesus though.
|
| |
|
| |
 |
ak

|
Posted: 2003-12-25 17:54:00 |
Top |
java-programmer >> Happy Xmas!
> > [ And apologies in advance - it is horrendously
> > 'IE' oriented - using the <bgsound> tag!]
> I could hear your MIDI on Mozilla/Linux. It's beauifully arranged.
> But X'mas is nothing for us orientals. I respect words from Jesus though.
X'mas is much older then christianity.
Long time church tryed to forbid it, but it doesnot worked.
Then they made his own feast at same time!
|
| |
|
| |
 |
Darryl L. Pierce

|
Posted: 2003-12-30 5:37:00 |
Top |
java-programmer >> Happy Xmas!
Andrew Thompson wrote:
>> Hope everybody who celebrates has a wonderful holiday, and that all have
>> a good vacation day! :)
>
> Well _I_ was resisting doing this, but you
> have opened the (flood) gates now Darryl!
>
> http://www.physci.org/test/xmas/ :-)
>
> [ And apologies in advance - it is horrendously
> 'IE' oriented - using the <bgsound> tag!]
Came out fine on Konqueror! :)
--
Darryl L. Pierce <email***@***.com>
Visit the Infobahn Offramp - <http://mypage.org/mcpierce>
"What do you care what other people think, Mr. Feynman?"
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- java kerberos with DCE KDCHi all,
Before I go trying to reinvent the wheel, I figured I would ask the
experts. Has anyone had the Java kerberos client successfully
interoperate with a DCE KDC? On the surface, it looks as though it
should work. I coded up a quick test, and found that Java is using the
host field differently than DCE would like, although the rest of the
data looked OK.
Thanks in advance for any help or information on interoperability you
can provide.
Regards,
Neal
--
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
- Neal A. Dillman * email***@***.com -
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
- My opinions are. -
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
- 2
- System.currentTimeMillis not returning GMT/UTC (J2me)I've got an application that I built for the Motorola i730
MIDP2.0 platform. System.currentTimeMillis() always seems
to return me -as stated- in GMT/UTC. I ported the application
to run against the i88s phone MIDP1.0 and the same method
is returning me the time in the Local Time.
Is this a know issue, or am I going about this the wrong
way? It would be so bad getting the local time, but it appears
that TimeZone.getDefault().getID() is returning GMT !
Any ideas?
Thanks.
- 3
- Use of scrolling in the JBuilder IDEDoes anybody know why the use of scrolling is not supported in the IDE of
JBuilder ? (the middle mouse button). Will this be supported sometime in the
future? Because it is really convienient.
Also can you tell me why the Java programs do not support the clicking of
the middle mouse button hit as an event?
Thanks in advance.
- 4
- Upgrade from 1.4.2_10 to 1.5.0_06I recently upgraded my JAVA and now I am unable to run any JAVA applets.
All I am getting is a "General Exception" dialog box and a whole lot of CRAP
in the "JAVA Console" - see below...
---------------------------------------------------------------------------------
Java Plug-in 1.5.0_06
Using JRE version 1.5.0_06 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Rob
network: Loading user-defined proxy configuration ...
network: Done.
network: Loading proxy configuration from Internet Explorer ...
network: Done.
network: Loading direct proxy configuration ...
network: Done.
network: Proxy Configuration: No proxy
basic: Cache is disabled by user
----------------------------------------------------
c: clear console window
if: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
basic: Registered modality listener
liveconnect: Invoking JS method: document
liveconnect: Invoking JS method: URL
basic: Referencing classloader: sun.plugin.ClassLoaderInfo@87a5cc,
refcount=1
basic: Added progress listener: sun.plugin.util.GrayBoxPainter@152544e
basic: Loading applet ...
basic: Initializing applet ...
basic: Starting applet ...
network: Connecting http://www.java.com/applet/testvm.class with
proxy=DIRECT
network: Connecting http://www.java.com/applet/testvm/class.class with
proxy=DIRECT
load: class testvm.class not found.
java.lang.ClassNotFoundException: testvm.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.java.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
basic: Exception: java.lang.ClassNotFoundException: testvm.class
java.lang.ClassNotFoundException: testvm.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: www.java.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
basic: Modality pushed
basic: Modality popped
Anyone else experienced this issue? SUN seems to be more than a little
perplexed - and is not providing much help...
- 5
- Alternative for deprecated method JFrame.show()I'm messing around with Java Swing. I'm also messing around with
Eclipse instead of a plain text editor such as TextPad.
When I create the following two classes in Eclipse, I get a persistent
warning that
The method show() from the type Window is deprecated
But I've checked the API docs (hence my looking for the 1.5.0 docs) and
it does NOT indicate that show() is deprecated. Any words of
guidance/advice?
Thanks
import javax.swing.*;
public class LoanCalculatorApp
{
public static void main(String[] args)
{
JFrame frame = new LoanCalculatorFrame();
frame.show();
}
}
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.text.*;
public class LoanCalculatorFrame extends JFrame
{
public LoanCalculatorFrame()
{
setTitle("Loan Calculator");
Toolkit tk = Toolkit.getDefaultToolkit();
Dimension d = tk.getScreenSize();
System.out.println("Screen:" + d.width + " by " + d.height + "
pixels");
int height = 200;
int width = 267;
setBounds((d.width-width)/2, (d.height-height)/2, width, height);
setResizable(false);
addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
Container contentPane = getContentPane();
JPanel panel = new JPanel();
contentPane.add(panel);
}
}
- 6
- Sexy GirlfriendsPornoduel.com
Bodypaint - http://www.pornoduel.com/duel.php?myCategory=bodypaint
Bondage - http://www.pornoduel.com/duel.php?myCategory=bondage
Sexy Amatures - http://www.pornoduel.com/duel.php?myCategory=amature
Sloppy Blow Jobs - http://www.pornoduel.com/duel.php?myCategory=blowjob
Sexy Costumes - http://www.pornoduel.com/duel.php?myCategory=costume
Erotic Art - http://www.pornoduel.com/duel.php?myCategory=hentai
Nasty Lesibans - http://www.pornoduel.com/duel.php?myCategory=lesbian
Sexy Sluts - http://www.pornoduel.com/duel.php?myCategory=frontal
Perfect Pussy - http://www.pornoduel.com/duel.php?myCategory=pussy
- 7
- Applet icon & status barHi,
I have an applet that extends a JFrame. How can I change or remove
the java icon in the upper-left corner and the status bar "Java Applet
Window" ?
Thanks
- 8
- Questions about using Java 3DHi everyone (newbie here),
I'd like to develop my skills to become a professional java developer.
I was wondering about your opinion regarding the Java 3d API. Is it
popular?
>From my google searches it looks like Java3d is most popular in the
mobile
device realm. Everywhere else it appears quiet. So for instance I
wanted to
build a 3d applet for my website (to build my portfolio). Do you think
this is
wise? Or are there better alternatives?
Thanks for any advise,
Dennis.
- 9
- I AM FUCKING SICK OF ROEDY GREENStephen Kellett wrote:
> If you are going to insult people, please learn to spell.
As usual, you have to point out minor errors because you have nothing to
say regarding the actual content of my posts. so what, a mispelling,
you knew what I meant. what purpose does spelling have beyond that? what
is this, a spelling bee you dork.
> Indeed. If you have a point to make, make it politely.
no, say please. dont tell others what to do.
In most
> societies, online and offline, opinions of rude people don't count.
Oh, ok dork. but if dont you have a point to make regarding the actual
content of my posts rather than being a star trek geek, then shut your ahole
- 10
- int return in JSpinner."Matteo Finistauri" <email***@***.com> writes:
> I'd like to have the int value in a JSpinner. I tryed in this way:
> int h = MySpin.getValue();
> but it doesn't work. I tried to cast the value like this:
> int h = (int) MySpin.getValue();
> but it doesn't work.
Why should it? You can't cast Object to int.
> What can I do????? Thank you!
If you use a SpinnerNumberModel, then
((Number)MySpin.getValue()).intValue()
or
((SpinnerNumberModel)MySpin.getModel()).getNumber().intValue()
/Thomas
- 11
- Static Variables in Servlet ContainerJohn C. Bollinger wrote:
> Application servers typically assign different ClassLoaders to different
> web applications. That, combined with typical ClassLoader delegation
> behavior, normally produces the situation you describe. It is probably
> fairly safe to expect that kind of behavior, but be advised that it is
> not guaranteed. In particular, in some application servers that support
> it, hot (re)deployment may cause such expectations to be incorrect.
Well, one part of that is very definitely guaranteed: that classes in
web applications' relevant WEB-INF folders will be loaded in a class
loader that's unique to that web application. The part about shared
classes and a container lib directory is entirely implementation-
dependent.
--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
- 12
- Need a project... found a website on mindprodJohn T wrote:
> First, for those who may not already know, I am NOT a Java programmer. I
> am learning the language for my own purposes (
> Along with Ruby, XML, Perl and Groovy).
>
> I have sucessfully written a Java program which parses an XML file and
> am using it in my job. I am a technical support person, who specializes
> in printing systems, namely the way that our systems (HPUX and SunOS)
> interface with a print server running Easyspooler and Infoprint Manager.
>
> With that in mind, I think I am ready for a project. However, the
> closest thing I can come up with on my own, as anyone who has read any
> of my previous threads can tell, is some form of real world modelling. I
> am *not* convinced that this would be benefical to me as a learning
> experience.
>
> So let me elaborate on what I have been studying.
> I am familiar with classes, interfaces, packages and polymorphism,
> although interfaces and polymorphism are still somewhat foreign to me. I
> know a little bit about interfacing with Oracle and MySQL and have done
> a very rudimentary JSP page which talks to an Oracle database.
>
> Since I have no current projects in my job which require me to do any
> kind of Java programming (I came up with the XML parser as satisfying a
> need I had) I am looking for some suggestions.
>
> I have made my way through some of Eckle's book (and even have had an
> email from him). I have worked my way through the first portion of the
> Sun Java Tutorial. I've studied the Horstmann books (text for a class I
> took in Java) and, my favorite, Head First Java.
>
> I would like to do something with what I have learned. I'm not ready
> for GUI programming yet, nor do I want something trivial. Perhaps
> someone out there has written something along the lines of what I am
> looking for and would be willing to share with me the requirements for
> what they did. From the requirements, I can do a Use-Case and UML
> diagrams and from there, get to the coding.
>
> *Remember* I come from a procedural language (COBOL) background and have
> done very little OOP aside from SAS (does anyone remember SAS) and some
> Delphi, so please, be gentle. A simple project is all I am looking for.
> I'm not going to market it and I'm not going to post my code here
> looking for suggestions on how to clean it up.
>
>
Since no one has come up with anything I did a google search (GIYF) for
beginner java project and this is one of the sites which came up.
http://mindprod.com/projects/beginner.html
Do these make sense as beginner projects or am I out of my league again?
- 13
- Jsp Error Cant Get Data from databaseHi
i am writing a JSP page which connects to Mysql DataBase
i can get the connection but i cant get to execute the query on the
database
plz help
the code of jsp file
<%@ page import ="java.lang.*" %>
<%@ page import ="java.sql.*" %>
<html>
<head>
<title>
Index Page
</title>
</head>
<body>
jsp pages is better than ASP.NET
<%
int x;
Connection conn=null;
Statement st=null;
ResultSet rt=null;
String query="select * from user";
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/
mysql","root","aaaa");
if(conn==null)
{
out.print("not connected");
}
out.print("<br>"+"Connection"+conn+"<br>");
try
{
st = conn.createStatement();
rt=st.executeQuery("select * from a.a");
while(rt.next())
{
String y;
String str;
x=rt.getInt("id1"+"<br />.");
y= rt.getString("id2"+"<br />.");
str= rt.getString("id3"+"<br />.");
out.print(x);
out.print(y);
out.print(str);
}
}
catch(Exception ex)
{
out.print("<br>");
out.print("Timeoooo "+"<br />");
}
finally
{
if (rt != null) rt.close();
if (st != null) st.close();
if (conn != null) conn.close();
out.print("<br>");
out.print("Timeoooo"+"<br />");
}
%>
<%
conn = null;
st = null;
ResultSet rs = null;
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn =
DriverManager.getConnection("jdbc:mysql://localhost:
3306/","root","aaaa");
st = conn.createStatement();
rs = st.executeQuery("select * from a.employees");
while(rs.next()) {
%>
<TR><TD><%= rs.getString("lname_txt") %></TD>
<TD><%= rs.getString("fname_txt") %></TD></TR>
<%
}
%>
</TABLE>
<%
} catch (Exception ex) {
ex.printStackTrace();
%>
</TABLE>
Ooops, something bad happened:
<%
} finally {
if (rs != null) rs.close();
if (st != null) st.close();
if (conn != null) conn.close();
}
%>
</body>
</html>
- 14
- Managing Session with javamailHi all,
I send a large number of emails using javamail. My problem is that my
provider limits the number of emails I can send out per minute per
session. On top of that, it does not allow me to use another SMTP
server than its own.
My first way to deal with that has been to include a sleep in my
sending loop in order to respect their quota (20 mails per minute).
But I now would like to explore faster ways to send emails out.
One of my idea was to close the session and reopen a new one to see if
that would be accepted by my provider server. But I don't see that
being a possilbe with javamail. Am I wrong?
Can you come up with other ideas?
Has anyone of you guys had to deal with such an issue before?
Thanks,
Necleto
- 15
- why wont this workwhat is wrong with my code to make it throw this IOException?
import java.io.*;
public class mainClass {
public static void main(String[] args) {
PrintStream MyOutput = null;
try {
//dies here:
MyOutput = new PrintStream(new FileOutputStream("ftp://
****username****:*****password*****@ftp.*****host****.com/web/
whatever.com/hi.dat"));
} catch (IOException e) {
System.out.println("crap");
}
MyOutput.println("hi");
MyOutput.close();
}
}
|
|
|