comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * Need as much help as possible - 11 messages, 11 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8 * Swing heavy components in headless enviroment - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6cf25c3a68749868 * JSP questions - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/533d0622938c7ceb * Diff of Sun Java System AppServer vs. SunONE Server vs. Sun Java System Web Server ? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a564ecbce2ee4789 * rmi passing parameters - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c1afc3e0db5e1524 * Struts validator is not working - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b2dc528ed5c883d * Writting data to a SocketChannel using NIO - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/73de6bca3d676791 * Swing - Detect how focus was moved? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/844c965c9aa3c8c1 * Help needed! how to deploy java application - 4 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1be98d1355247063 * ComponentOrientation Class - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b601af764afa6138 * How to set CLASSPATH for Javamail - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c7a1d224b062c1a4 * Tomcat+Struts+Cocoon: Good tutorials needed about Cocoon integration - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4ea8cae58cb318ab ========================================================================== TOPIC: Need as much help as possible http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8 ========================================================================== == 1 of 11 == Date: Thurs, Nov 11 2004 11:15 am From: Carl Howells <[EMAIL PROTECTED]> WCU_Student3456 wrote: > hey i'm new to the java scene and i have a major assignment due for class > on the 12th of nov. I need help with a program that has a point class...a > driver and a circle class. the program is suppost to display info about the > circle...if anyone is interested or has pitty...college students love > pitty..please respond and i will try to send the assignment to you...i > have it scanned on adobe... > > thanks ever so much > In addition to Kristofer's comment.. Why would you need help with an assignment like that? It's the kind of thing anyone should be able to do drunk, and even understand what they did when they sober up. == 2 of 11 == Date: Thurs, Nov 11 2004 11:27 am From: "PerfectDayToChaseTornados" <[EMAIL PROTECTED]> "WCU_Student3456" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | hey i'm new to the java scene and i have a major assignment due for class | on the 12th of nov. I need help with a program that has a point class...a | driver and a circle class. the program is suppost to display info about the | circle...if anyone is interested or has pitty...college students love | pitty..please respond and i will try to send the assignment to you...i | have it scanned on adobe... | | thanks ever so much | How much are you paying for someone to do your homework for you? ;-) -- -P "Programs that are hard to read are hard to modify. Programs that have duplicated logic are hard to modify. Programs with complex conditional logic are hard to modify" ( Kent Beck) == 3 of 11 == Date: Thurs, Nov 11 2004 11:47 am From: Andy Hill <[EMAIL PROTECTED]> "WCU_Student3456" <[EMAIL PROTECTED]> wrote: >hey i'm new to the java scene and i have a major assignment due for class >on the 12th of nov. I need help with a program that has a point class...a >driver and a circle class. the program is suppost to display info about the >circle...if anyone is interested or has pitty...college students love >pitty..please respond and i will try to send the assignment to you...i >have it scanned on adobe... > Geez, that's like Java Programming 101. Google Is Your Friend. Try to at least understand the code you rip off. == 4 of 11 == Date: Thurs, Nov 11 2004 11:50 am From: "Ann" <[EMAIL PROTECTED]> "WCU_Student3456" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > hey i'm new to the java scene and i have a major assignment due for class > on the 12th of nov. I need help with a program that has a point class...a > driver and a circle class. the program is suppost to display info about the > circle...if anyone is interested or has pitty...college students love > pitty..please respond and i will try to send the assignment to you...i > have it scanned on adobe... > > thanks ever so much Why not outsource it to another country, grab a phone book. You can probably get all your course work done there not just java. == 5 of 11 == Date: Thurs, Nov 11 2004 11:56 am From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 11 Nov 2004 14:04:49 -0500, WCU_Student3456 wrote: > hey i'm new .. People who are learning Java are better helped on a different group described here. <http://www.physci.org/codes/javafaq.jsp#cljh> But please think about the comments made by the other 3 posters carefully before making any posts to c.l.j.help. Your post would have been considered quite rude if you had posted it there. [ Here, it is just funny. ;-) ] -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 6 of 11 == Date: Thurs, Nov 11 2004 12:41 pm From: Collin <[EMAIL PROTECTED]> Ann wrote: > "WCU_Student3456" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>hey i'm new to the java scene and i have a major assignment due for class >>on the 12th of nov. I need help with a program that has a point class...a >>driver and a circle class. the program is suppost to display info about > > the > >>circle...if anyone is interested or has pitty...college students love >>pitty..please respond and i will try to send the assignment to you...i >>have it scanned on adobe... >> >>thanks ever so much > > > Why not outsource it to another country, grab a phone book. You can > probably get all your course work done there not just java. > > I'll do it for 50,000 USD; that's dicounted for first-timers. == 7 of 11 == Date: Thurs, Nov 11 2004 2:57 pm From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Collin coughed up: > Ann wrote: >> "WCU_Student3456" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>> hey i'm new to the java scene and i have a major assignment due for >>> class on the 12th of nov. I need help with a program that has a >>> point class...a driver and a circle class. the program is suppost >>> to display info about >> >> the >> >>> circle...if anyone is interested or has pitty...college students >>> love pitty..please respond and i will try to send the assignment to >>> you...i have it scanned on adobe... >>> >>> thanks ever so much >> >> >> Why not outsource it to another country, grab a phone book. You can >> probably get all your course work done there not just java. >> >> > > I'll do it for 50,000 USD; that's dicounted for first-timers. Now all that's missing is for some Indian to pipe up and quote 10,000 USD for it. -- With knowledge comes sorrow. == 8 of 11 == Date: Thurs, Nov 11 2004 7:07 pm From: Lāʻie Techie <[EMAIL PROTECTED]> On Thu, 11 Nov 2004 22:57:44 +0000, Thomas G. Marshall wrote: > Collin coughed up: >> I'll do it for 50,000 USD; that's dicounted for first-timers. > > Now all that's missing is for some Indian to pipe up and quote 10,000 USD > for it. Actually, I'd be willing to do this assignment for US$5,000. For an extra grand, I would even explain on how it works. La'ie Techie == 9 of 11 == Date: Thurs, Nov 11 2004 7:55 pm From: Sudsy <[EMAIL PROTECTED]> Lāʻie Techie wrote: > On Thu, 11 Nov 2004 22:57:44 +0000, Thomas G. Marshall wrote: > > >>Collin coughed up: >> >>>I'll do it for 50,000 USD; that's dicounted for first-timers. >> >>Now all that's missing is for some Indian to pipe up and quote 10,000 USD >>for it. > > > Actually, I'd be willing to do this assignment for US$5,000. For an extra > grand, I would even explain on how it works. > > La'ie Techie > I'll incorporate all these observations into another thread, should the OP respond. Provides an opportunity for clarification of responsibilities and all that good stuff... -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. == 10 of 11 == Date: Thurs, Nov 11 2004 10:32 pm From: "dar7yl" <[EMAIL PROTECTED]> "Collin" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ann wrote: >> "WCU_Student3456" <[EMAIL PROTECTED]> wrote in message >> news:[EMAIL PROTECTED] >> >>>hey i'm new to the java scene and i have a major assignment due for class >>>on the 12th of nov. I need help with a program that has a point >>>class...a >>>driver and a circle class. the program is suppost to display info about >> >> the >> >>>circle...if anyone is interested or has pitty...college students love >>>pitty..please respond and i will try to send the assignment to you...i >>>have it scanned on adobe... >>> >>>thanks ever so much >> >> >> Why not outsource it to another country, grab a phone book. You can >> probably get all your course work done there not just java. >> >> > > I'll do it for 50,000 USD; that's dicounted for first-timers. > I'll do it for $50,000 CDN dollars. == 11 of 11 == Date: Thurs, Nov 11 2004 11:20 pm From: Rob <[EMAIL PROTECTED]> dar7yl wrote: > "Collin" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > >>Ann wrote: >> >>>"WCU_Student3456" <[EMAIL PROTECTED]> wrote in message >>>news:[EMAIL PROTECTED] >>> >>> >>>>hey i'm new to the java scene and i have a major assignment due for class >>>>on the 12th of nov. I need help with a program that has a point >>>>class...a >>>>driver and a circle class. the program is suppost to display info about >>> >>>the >>> >>> >>>>circle...if anyone is interested or has pitty...college students love >>>>pitty..please respond and i will try to send the assignment to you...i >>>>have it scanned on adobe... >>>> >>>>thanks ever so much >>> >>> >>>Why not outsource it to another country, grab a phone book. You can >>>probably get all your course work done there not just java. >>> >>> >> >>I'll do it for 50,000 USD; that's dicounted for first-timers. >> > > > I'll do it for $50,000 CDN dollars. > > I'll do it for a bottle of vodka. That, or $25 CDN. ========================================================================== TOPIC: Swing heavy components in headless enviroment http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6cf25c3a68749868 ========================================================================== == 1 of 3 == Date: Thurs, Nov 11 2004 11:26 am From: "Steve W. Jackson" <[EMAIL PROTECTED]> In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Andres Medina) wrote: >:Hi >: >:I developed a program that runs simulations. My first version used >:JFrames to show a User Interface. But I noticed it would be very >:helpful if the program could run in the background (I use Linux) and >:perhaps I can run it remotely through ssh. >: >:I changed everything so that, if the user choosed the "NO-GUI" option, >:no JFrames were visible, altough I did not remove the instances of the >:JFrames (Because to do so, I have to make big changes in the code). >:The program works fine, for example in a GNOME terminal (of course, >:the display is still there), but it does not run through ssh. I get >:the following error: >: >:Exception in thread "main" java.awt.HeadlessException: >:No X11 DISPLAY variable was set, but this program performed an >:operation which requires it. >: at >: java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:15 >: 9) >: at java.awt.Window.<init>(Window.java:310) >: at java.awt.Frame.<init>(Frame.java:419) >: at javax.swing.JFrame.<init>(JFrame.java:194) >: at ams.utils.ui.SimUI.<init>(Unknown Source) >: at ams.utils.ui.SimUI.main(Unknown Source) >: >: >:Can anyone tell me, if it is posible to do what I am trying? If you revisit the API docs, you'll find that the mere act of instantiating many Swing components throws the HeadlessException if there's no graphics environment (see the JFrame constructors for an example). So you've got to go back into the code and suppress the instantiation of those items if you want to be able to run in this environment. Alternatively, as the message indicates, you may be able to set the DISPLAY variable. But that may not be reliable -- can't say, as I haven't tried this myself. = Steve = -- Steve W. Jackson Montgomery, Alabama == 2 of 3 == Date: Thurs, Nov 11 2004 11:48 am From: "Ann" <[EMAIL PROTECTED]> "Andres Medina" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi > > I developed a program that runs simulations. My first version used > JFrames to show a User Interface. But I noticed it would be very > helpful if the program could run in the background (I use Linux) and > perhaps I can run it remotely through ssh. > > I changed everything so that, if the user choosed the "NO-GUI" option, > no JFrames were visible, altough I did not remove the instances of the > JFrames (Because to do so, I have to make big changes in the code). > The program works fine, for example in a GNOME terminal (of course, > the display is still there), but it does not run through ssh. I get > the following error: > > Exception in thread "main" java.awt.HeadlessException: > No X11 DISPLAY variable was set, but this program performed an > operation which requires it. > at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) > at java.awt.Window.<init>(Window.java:310) > at java.awt.Frame.<init>(Frame.java:419) > at javax.swing.JFrame.<init>(JFrame.java:194) > at ams.utils.ui.SimUI.<init>(Unknown Source) > at ams.utils.ui.SimUI.main(Unknown Source) > > > Can anyone tell me, if it is posible to do what I am trying? I have not used X11 in a while, but the DISPLAY environment variable is used to determine the location of the screen etc. for the server which is normally your terminal but you can assign it to another terminal if you want to. If you assign it to /dev/null it may not work, but it is worth a try. == 3 of 3 == Date: Thurs, Nov 11 2004 1:06 pm From: Mark Scott <[EMAIL PROTECTED]> On Thu, 11 Nov 2004 10:45:29 -0800, Andres Medina wrote: [...] > I changed everything so that, if the user choosed the "NO-GUI" option, > no JFrames were visible, altough I did not remove the instances of the > JFrames (Because to do so, I have to make big changes in the code). The > program works fine, for example in a GNOME terminal (of course, the > display is still there), but it does not run through ssh. I get the > following error: > > Exception in thread "main" java.awt.HeadlessException: No X11 DISPLAY > variable was set, but this program performed an operation which requires > it. [...] > Can anyone tell me, if it is posible to do what I am trying? If you're running ssh from an X session and your server's ssh daemon is configured to permit X11 forwarding to the local display then pass the -X flag to ssh (or put the corresponding option into your ssh config file). E.g. $ ssh -X [EMAIL PROTECTED] java -cp ... The server config option you need is : X11Forwarding yes If it's not enabled then the admin might be prepared to enable it for you (especially if you're the admin ;-) ), but do first read the ssh manpage for a warning about using X11 forwarding. -- Mark Scott [EMAIL PROTECTED] GPG Key ID: 0x2CCE1173 - signed/encrypted mail preferred ========================================================================== TOPIC: JSP questions http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/533d0622938c7ceb ========================================================================== == 1 of 3 == Date: Thurs, Nov 11 2004 1:04 pm From: "John C. Bollinger" <[EMAIL PROTECTED]> redpanda wrote: > have some questions about JavaServer Pages to ask > > 1. I made several input fields for user to input the height, width and > other stuff to create a table. how can I make the font in color red in > first row and first column automaticly and font in other rows and > columns remain the same color? With JSP, always focus on the output. Most JSPs, including yours, output HTML code. Determine how to code the visual effects you want in HTML, then make your JSP produce that output. The HTML details are off-topic for this newsgroup, but your main options are to use Cascading Style Sheets (preferred) or to insert appropriate styling markup (e.g. <font> elements, which you seem to already be doing). > 2. I want to add a title inside the table that need to colspan the > rest of the table. Becasue I don't know what # the user will input for > columns, so I can't set it before user input. so plz help me on this. I don't see how you expect it to work at all, then. When the JSP is processing a request it has only the information available from the request, session, and application. The JSP cannot presciently determine how the client might react to the response, and it cannot do anything to change the response once it is sent. However, if you can create a table with the correct number of columns in the first place then you necessarily know some number of columns that the client *already* requested. Either you're missing something here or I am. > 3. Randomly place an input field in one of the cells – a different > cell on each refresh. If the user enters the correct product there and > changes the focus (by clicking outside the field), a Javascript > provided by the jsp page checks the answer and makes appropriate alert So what's the problem? If you need help with the Javascript then this is the wrong group. Javascript is a completely separate language from Java, with only superficial similarities. If you need help generating a random number, then look into java.util.Random and / or Math.random(). If you need help creating an input field then see my above comments about HTML. > My jsp file looks like this: > > <HTML> > <head></head> > <BODY> > > <% > String s2 = request.getParameter("Bsize") ; > s2 = s2.trim(); > out.print("<table bgcolor=silver border= "); > out.print(s2); > out.print(" "); > String s3 = request.getParameter("Bcolor") ; > s3 = s3.trim(); > out.print("bordercolor= "); > out.print(s3); > out.print(">"); > > String m1 = request.getParameter("mName") ; > m1 = m1.trim(); > int M = Integer.parseInt(m1); > > String n1 = request.getParameter("nName") ; > n1 = n1.trim(); > int N = Integer.parseInt(n1); > > String s = request.getParameter("FullName") ; > s = s.trim(); > out.println("<font color=red size=6>"); > out.println(s); > out.println("'s table is: </font>"); > > out.println("<tr colspan= "); > > out.print(m1); > > out.println(">"); > out.print("<th> Numbers </th> </tr>"); > > > for (int i =1; i<= M; i++ ) > { > out.println("<tr width= 10 >"); > > for (int j =1; j<= N; j++ ) > { > out.println("<th >"); > out.println(j * i); > out.println("</th>"); > } > > out.println("</tr>"); > > } > %> > > </table> That is truly abominable JSP code. Sorry, but it is. See all those out.print() and out.println() invocations? One of the original goals of JSP was to not have to write servlet code that looks like that. Why are you even bothering with JSP (instead of a pure servlet) if you're going to write it like that? Also, most interested people agree that JSP authors ought to focus on minimizing the use of scriptlets in their JSPs [some even argue that scriptlets should be avoided altogether], but your JSP is almost all one big scriptlet. Furthermore, unless you've truncated it, your JSP doesn't even produce a valid HTML document. And that's before we even get to not putting your HTML attribute values in quotes, not using consistent coding conventions in your scriptlet code, yada yada yada. John Bollinger [EMAIL PROTECTED] == 2 of 3 == Date: Thurs, Nov 11 2004 1:53 pm From: Sudsy <[EMAIL PROTECTED]> John C. Bollinger wrote: <snip> > That is truly abominable JSP code. Sorry, but it is. See all those > out.print() and out.println() invocations? One of the original goals of > JSP was to not have to write servlet code that looks like that. Why are > you even bothering with JSP (instead of a pure servlet) if you're going > to write it like that? Also, most interested people agree that JSP > authors ought to focus on minimizing the use of scriptlets in their JSPs > [some even argue that scriptlets should be avoided altogether], but your > JSP is almost all one big scriptlet. Furthermore, unless you've > truncated it, your JSP doesn't even produce a valid HTML document. And > that's before we even get to not putting your HTML attribute values in > quotes, not using consistent coding conventions in your scriptlet code, > yada yada yada. Count me among those who eschew scriptlets. Either use existing tag libraries or roll your own. It's not that difficult and makes the JSP so much easier to read. It's also easier on your graphic artists when you explain that they just need to use a particular tag to obtain desired functionality. This will be familiar since HTML is merely tag markup. Embedded Java code just makes their heads spin... ;-) -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. == 3 of 3 == Date: Thurs, Nov 11 2004 7:49 pm From: "Hal Rosser" <[EMAIL PROTECTED]> <html> <head> <style> .makeRed {color:red;} </style> </head> <Body> .....in the body use if statement in the code if the condition warrants red text then have the code make the <td> tag like this <td class='makeRed> ... there's a free css tutorial on www.w3schools.com "redpanda" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I don't get it what you are saying, can you show me an example? > > > "Hal Rosser" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > > You can use CSS (Cascading style sheets) to do that. > > --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.788 / Virus Database: 533 - Release Date: 11/1/2004 ========================================================================== TOPIC: Diff of Sun Java System AppServer vs. SunONE Server vs. Sun Java System Web Server ? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a564ecbce2ee4789 ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 1:40 pm From: [EMAIL PROTECTED] (Ulf Meinhardt) What are the differences of these three Java Servers from Sun ? Ulf ========================================================================== TOPIC: rmi passing parameters http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c1afc3e0db5e1524 ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 2:10 pm From: "KiLVaiDeN" <[EMAIL PROTECTED]> <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > this my first java rather than rmi program. I faced a little problem > with passing parameters. > I made lookup for the object in client side then defined it. the > program prompts the user > to insert three String data type statements using BufferedReader then > passes them > to the remote method. in server side the first parameter is used to > name a new file using > FileWriter and the second and third arguments to be printed in the > file. > the result: the file is created successfully but the two Strings are > not printed. > > this is my a part of my code: > > Client: > > [code]BufferedReader br = new BufferedReader(new > InputStreamReader(System.in)); > remoteObject.NewFile(br.readLine(),br.readLine(),br.readLine()); > br.close();[/code] > > server: > > [code]public void NewFile(String name,String str1,String str2) > { > FileWriter fw = new FileWriter(name+".txt"); > BufferedWriter bw = new BufferedWriter (fw); > bw.write(str1+" "+str2); > fw.flush(); > bw.flush(); > fw.close(); > bw.close(); > }[/code] > > why don't the two Strings printed :x Did you handle exceptions correctly in server ? And have you tried without the flush() ? K ========================================================================== TOPIC: Struts validator is not working http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5b2dc528ed5c883d ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 5:36 pm From: Sudsy <[EMAIL PROTECTED]> Johan wrote: > I really need some help. I´m a beginner at Struts and have run in to > some trouble with the validator framework. The problem is simply that > no validation takes place at all. I guess that I´ve missed something > in my configuration so I will show you some of the code I´ve written. > I would be really nice if someone more expirienced than I would like > to take a look at it. When Tomcat boots up I can see at the console > somethin like "validatorPlugIn initResources ...Loading validation > rules from /WEB-INF/validator-rules.xml" . A little bit further down > can a see "..Adding Formset ".. etc.. so I dont think it is a problem > with the validator-init. <snip> While I don't have the time (if you don't have the money) to address your problem directly, I can suggest an article I've written: <http://www.sudsy.net/technology/validation.html> Hope it helps! -- Java/J2EE/JSP/Struts/Tiles/C/UNIX consulting and remote development. ========================================================================== TOPIC: Writting data to a SocketChannel using NIO http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/73de6bca3d676791 ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 6:37 pm From: Esmond Pitt <[EMAIL PROTECTED]> The best way is to assume that you can write until you get a return value of zero from the write call. When this happens on a channel you should register the channel for OP_WRITE. Whenever you succeed in writing all the data you asked to write, you should deregister for OP_WRITE. EJP ========================================================================== TOPIC: Swing - Detect how focus was moved? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/844c965c9aa3c8c1 ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 8:04 pm From: "MikL" <[EMAIL PROTECTED]> Hi all, I have a Swing UI containing JTextFields. When the user moves the focus into a JTextField using the keyboard (eg. by pressing TAB), I want to use selectAll() so that the user can then overwrite the field contents without messing with the mouse or having to type multiple backspaces or other keyboard gymnastics. However, I _don't_ want to selectAll() if focus was moved to the field using the mouse. Currently I'm looking at monitoring the sequence of FocusListener and MouseListener events to determine whether the user used the keyboard or mouse to move focus, but it seems unelegant and relies on eg. mousePressed() running after requestFocus() and before focusGained(). Is there a better way to detect how the focus was moved? Regards, MikL ========================================================================== TOPIC: Help needed! how to deploy java application http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/1be98d1355247063 ========================================================================== == 1 of 4 == Date: Thurs, Nov 11 2004 9:48 pm From: Andrew Thompson <[EMAIL PROTECTED]> On 11 Nov 2004 14:56:23 -0800, Jane Sfelc wrote: > I'm new to Java programming and need some help ... People who are leaarning Java are better helped on a different group described here.. <http://www.physci.org/codes/javafaq.jsp#cljh>, but.. > I'm using NetBeans 4.0 beta2 to program Java applications. Your problems begin right here. You should not be using a D'n'D editor* to design your Java at this stage, since you have little idea of what you are doing, like.. * <http://www.xdweb.net/~dibblego/java/faq/answers.html#Q34> > When I type: > > java -jar PrimeraApp.jar a) This is far too premature to be jarring your project > The results are: > > Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: > org/netbe > ans/lib/awtextra/AbsoluteLayout b) Who put ans.lib.awtextra.AbsoluteLayout in yout code? I can take a rough guess, but you need to know, and need to write some Java without that. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 2 of 4 == Date: Thurs, Nov 11 2004 11:19 pm From: Steve Sobol <[EMAIL PROTECTED]> Andrew Thompson wrote: > On 11 Nov 2004 14:56:23 -0800, Jane Sfelc wrote: > > >>I'm new to Java programming and need some help ... > > > People who are leaarning Java are better helped on a different group > described here.. <http://www.physci.org/codes/javafaq.jsp#cljh>, but.. > > >>I'm using NetBeans 4.0 beta2 to program Java applications. > > > Your problems begin right here. You should not be using a D'n'D > editor* to design your Java at this stage, since you have little > idea of what you are doing, like.. > > * <http://www.xdweb.net/~dibblego/java/faq/answers.html#Q34> > >>When I type: >> >>java -jar PrimeraApp.jar > > > a) This is far too premature to be jarring your project > > >>The results are: >> >>Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: >>org/netbe >>ans/lib/awtextra/AbsoluteLayout > > > b) Who put ans.lib.awtextra.AbsoluteLayout in yout code? > I can take a rough guess, but you need to know, and need > to write some Java without that. org.netbeans.lib.awtextra.AbsoluteLayout is the class, and you specifically have to put it in your classpath otherwise your compile will fail. -- JustThe.net Internet & New Media Services, http://JustThe.net/ Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) / [EMAIL PROTECTED] PGP Key available from your friendly local key server (0xE3AE35ED) Apple Valley, California Nothing scares me anymore. I have three kids. == 3 of 4 == Date: Fri, Nov 12 2004 12:00 am From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 11 Nov 2004 23:19:12 -0800, Steve Sobol wrote: >> b) Who put ans.lib.awtextra.AbsoluteLayout in yout code? >> I can take a rough guess, but you need to know, and need >> to write some Java without that. > > org.netbeans.lib.awtextra.AbsoluteLayout is the class, and you specifically > have to put it in your classpath otherwise your compile will fail. While that may technically be the case, I feel the OP would be better served by .. a) Learning the Sun layouts. <http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html> b) Following the advice in the first (c.l.j.help) and second (set aside Netbeans for the moment) of the links you trimmed. -- Andrew Thompson http://www.PhySci.org/codes/ Web & IT Help http://www.PhySci.org/ Open-source software suite http://www.1point1C.org/ Science & Technology http://www.LensEscapes.com/ Images that escape the mundane == 4 of 4 == Date: Fri, Nov 12 2004 2:06 am From: Nigel Wade <[EMAIL PROTECTED]> Jane Sfelc wrote: > I'm new to Java programming and need some help ... > > I'm using NetBeans 4.0 beta2 to program Java applications. I can > compile and run them without trouble inside the IDE, but I can't get > them to work outside the IDE. I am using Swing components on my forms. > > After building the application, the IDE generates PrimerForm.class, > PrimerForm$1.class, PrimerForm$2.class, PrimerForm$3.class and > PrimeraApp.jar files (just one class in my first project). > > I am trying to run the application outside the IDE. When I type: > > java PrimerForm > > The results are: > > Exception in thread "main" java.lang.NoClassDefFoundError: PrimerForm > (wrong name: primeraapp/PrimerForm) That looks like a package problem. Is PrimerForm in the primeraapp package by any chance? You should run java from the base directory of the package structure, not from within a sub-package. You need to move up out of the primeraapp directory and then run: java primeraapp.PrimerForm -- Nigel Wade, System Administrator, Space Plasma Physics Group, University of Leicester, Leicester, LE1 7RH, UK E-mail : [EMAIL PROTECTED] Phone : +44 (0)116 2523548, Fax : +44 (0)116 2523555 ========================================================================== TOPIC: ComponentOrientation Class http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/b601af764afa6138 ========================================================================== == 1 of 1 == Date: Thurs, Nov 11 2004 9:54 pm From: "Hal Rosser" <[EMAIL PROTECTED]> "Programmiamo.it" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi, > how should be used this class? > Thanks. > > Giovanni > > >From the API: The ComponentOrientation class encapsulates the language-sensitive orientation that is to be used to order the elements of a component or of text. It is used to reflect the differences in this ordering between Western alphabets, Middle Eastern (such as Hebrew), and Far Eastern (such as Japanese). Fundamentally, this governs items (such as characters) which are laid out in lines, with the lines then laid out in a block. This also applies to items in a widget: for example, in a check box where the box is positioned relative to the text. There are four different orientations used in modern languages as in the following table. LT RT TL TR A B C C B A A D G G D A D E F F E D B E H H E B G H I I H G C F I I F C (In the header, the two-letter abbreviation represents the item direction in the first letter, and the line direction in the second. For example, LT means "items left-to-right, lines top-to-bottom", BL means "items bottom-to-top, lines bottom-to-top", and so on.) The orientations are: a.. LT - Western Europe (optional for Japanese, Chinese, Korean) b.. RT - Middle East (Arabic, Hebrew) c.. TR - Japanese, Chinese, Korean d.. TL - Mongolian Components whose view and controller code depends on orientation should use the isLeftToRight() and isHorizontal() methods to determine their behavior. They should not include switch-like code that keys off of the constants, such as: --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.788 / Virus Database: 533 - Release Date: 11/2/2004 ========================================================================== TOPIC: How to set CLASSPATH for Javamail http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/c7a1d224b062c1a4 ========================================================================== == 1 of 1 == Date: Fri, Nov 12 2004 12:22 am From: "yihan" <[EMAIL PROTECTED]> Hello, I added mail.jar and activation.jar into CLASSPATH. When compiling a java file, e.g msgsend.java, successful, and generate msgsend.class. But when excecuting msgsend, failed. It shows: Exception in thread "main" java.lang.NoClassDefFoundError: javax/mail/Message I do as following: in java compile file, add mail.jar and activation.jar into classpath: @echo off set CLASSPATH=d:\;D:\Java\Javamail\javamail-1.3.2\mail.jar;D:\Java\Javamail\jaf-1.0.2\activation.jar set PATH=%PATH%;C:\j2sdk1.4.1_02\bin javac %1 pause Can anybody tell me how to set CLASSPATH? Thank you. Zhao ========================================================================== TOPIC: Tomcat+Struts+Cocoon: Good tutorials needed about Cocoon integration http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4ea8cae58cb318ab ========================================================================== == 1 of 1 == Date: Fri, Nov 12 2004 12:42 am From: "Thomas S." <[EMAIL PROTECTED]> Hello, there! I hope, someone can help me with my problem: We have developed a CRM system (Apache+Tomcat+Struts+M$-SQL) which does provide reports. These reports are integrated as SQL-Statements in JSP pages and executed there via a Taglib. The result is always a styled HTML table. But now we want to expand this service by providing an export of these tables additionally as Excel or PDF (in the same style). Therefor we have searched for a solution which already provides such a feature. Apache's Cocoon has cought our attention there. Our question: Is there a good tutorial out there how to integrate Cocoon in an already fully developed environment like a CRM system? I googled the net but so far I have not found a satisfying document. Maybe someone knows the place to look? ;-) Thanks in advance for your help, Thomas ======================================================================= You received this message because you are subscribed to the Google Groups "comp.lang.java.programmer". comp.lang.java.programmer [EMAIL PROTECTED] Change your subscription type & other preferences: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe Report abuse: * send email explaining the problem to [EMAIL PROTECTED] Unsubscribe: * click http://groups-beta.google.com/group/comp.lang.java.programmer/subscribe ======================================================================= Google Groups: http://groups-beta.google.com
