comp.lang.java.programmer http://groups-beta.google.com/group/comp.lang.java.programmer [EMAIL PROTECTED]
Today's topics: * efficient network transfer - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 * Problem with double buffering.. - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9aeb201d21113d93 * How secure is Java? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3 * Garbage from resourceBundle.getObject() for Japanese - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f206e906199c9ae * CORBA or some other methodology? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7b217bf697c503b * JTree Directory System - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65ea2f59800e25b6 * Events with multiple JPanels and JButtons - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4089bcde4a9e68ed * How to write an efficient maximum function? - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f759ff7cc130859e * problem with wscompile: xsd:choice not recognized and NullPointerException - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f43e8bfdd0d9d883 * J2ME Clie TJ37 - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bddd3f7bc08dbf92 * different between configure libraries and configure JDKs - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a3cc5a0b53066f13 * What is package cache in a jar file - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dec0c6e21c7d3f0b * Looking for co-op, internship or volunteer java programmer. - 3 messages, 3 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/392330321f8c5f4d * Need as much help as possible - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8 * 'A'++ == 'B': Always True? - 2 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb79b41e32f311b2 * Displaying blank JLabel Icon. - 2 messages, 2 authors http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8787f391c42b6a42 * Hardware spec published? - 1 messages, 1 author http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/de3a1ca8e469825c ========================================================================== TOPIC: efficient network transfer http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/6996ec6c1fb6cf53 ========================================================================== == 1 of 3 == Date: Wed, Nov 17 2004 4:17 pm From: Esmond Pitt <[EMAIL PROTECTED]> (a) use BufferedInput/OutputStreams with buffers of at least 8k, or read into and write from a byte[8192] array, not a single byte (c) set your socket's output buffer to at least 48k (d) if you can control the reading socket, set its input buffer to at least 48k. == 2 of 3 == Date: Wed, Nov 17 2004 4:38 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Wed, 17 Nov 2004 22:51:18 GMT, Collin VanDyck wrote: > For future reference, please reference > > http://www.dictionary.com. I'm a bit busy at the moment, why don't you do it for me? After you check my posts[1], have a look over the 100,000 or so pages on my web sites[2] and see if you spot any errors there as well. [1] <http://groups.google.com.au/groups?as_ugroup=comp.lang.java.*&as_uauthors=andrew%20thompson> [2] See sig. below. TIA -- 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 == 3 of 3 == Date: Wed, Nov 17 2004 4:55 pm From: Knute Johnson <[EMAIL PROTECTED]> Esmond Pitt wrote: > (a) use BufferedInput/OutputStreams with buffers of at least 8k, or read > into and write from a byte[8192] array, not a single byte > (c) set your socket's output buffer to at least 48k > (d) if you can control the reading socket, set its input buffer to at > least 48k. > I'm curious how you would set your socket's buffer to 48k. Could you explain that and what it just what it would do for you? Thanks, -- Knute Johnson email s/nospam/knute/ ========================================================================== TOPIC: Problem with double buffering.. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/9aeb201d21113d93 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 4:40 pm From: David Zimmerman <[EMAIL PROTECTED]> Andrew Thompson wrote: > On Wed, 17 Nov 2004 00:38:28 GMT, David Zimmerman wrote: > > >>And 95.674% of all statistics are overly precise > > > Them's fightin' words! The figure is 95.674 +/- 0.0005%. teehee! ========================================================================== TOPIC: How secure is Java? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/38d2eda5f6def0e3 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 4:47 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Thu, 18 Nov 2004 05:51:49 +0800, steve wrote: > looks like the students are upto page 2 in their "how to learn java" > course work. And yet this 'student'* is a regular contributor to c.l.j.gui, as well as a contributor to the GUI FAQ and host to a translation of same. Both hiwa's answers and questions are short. * For all I know, 'hiwa' might be a student, but I suspect your comment had 'other meanings' to it. -- 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 ========================================================================== TOPIC: Garbage from resourceBundle.getObject() for Japanese http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/5f206e906199c9ae ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 5:51 pm From: Delia <[EMAIL PROTECTED]> Hi Group, I set up properties files to match different locales, and use the resourceBundle.getObject() function to retrieve the correct strings. This works great, but not with Japanese. With Japanese, I get a string of unicode characters back from getObject() that don't seem to correspond to the Japanese characters I have saved in my .properties file. I tried saving the .properties file in UTF-8, 16 bit unicode (big and little endian), but I just get varrying strings of characters that I can't figure out where they come from. Example: I went to babelfish and typed "File". It came back with a japanese word. I pasted that japanese word into a .properties file (using windows notepad.exe) and saved it as UTF-8. I loaded that string with getObject() and it returned: ã\u0083\u0095ã\u0082iã\u0082¤ã\u0083« Whereas the actual unicode values should be: 30D5 30A1 30A4 30EB I can't figure enough of a relationship between these sets of values to determine what it's trying to do? Help? -Delia ========================================================================== TOPIC: CORBA or some other methodology? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a7b217bf697c503b ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 6:19 pm From: [EMAIL PROTECTED] (Ted Holden) Another seriously stupid question here...... I've got a situation in which a java applet has to retrieve information from a server and the process which generates the information is complex and performance-critical enough that it pretty much has to be written in C++ asnd not Java. The one thing I know of which does that sort of thing is CORBA. But then, my knowledge of Java is pretty miniscule. Does anybody have any reason to believe that there might be any other methodology for doing that sort of thing, i.e. for allowing a Java applet to access a server object written in C++ which for any reason might be preferable to CORBA? ========================================================================== TOPIC: JTree Directory System http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/65ea2f59800e25b6 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 6:32 pm From: "Vincent Cantin" <[EMAIL PROTECTED]> You should make a CellRenderer for your tree, it will display the files in a differet way. ========================================================================== TOPIC: Events with multiple JPanels and JButtons http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/4089bcde4a9e68ed ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 6:39 pm From: "Oxnard" <[EMAIL PROTECTED]> I am trying to have 2 JPanels in one JFrame. The first JPanel (Panel1) has two buttons. The second JPanel has a JTextField. The app works as expected if I have only one button, but if I have a second button the second button does not work. I found this example online and would like to expand it to be able to use more than one button. What do I need to do to get the second button to do a simple println? I have seen a number of posting but I am just not quite getting it. Thanks import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Test extends JFrame{ public Test() { super("hello"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(400,400); Panel1 p1 = new Panel1(); Panel2 p2 = new Panel2(); getContentPane().setLayout(new BorderLayout()); getContentPane().add(p1, BorderLayout.SOUTH); getContentPane().add(p2, BorderLayout.CENTER); pack(); setVisible(true); } public static void main(String[] args){ setDefaultLookAndFeelDecorated(true); new Test(); } } public class YourHandler implements ActionListener{ private static JButton theButton; private static JTextField theField; public YourHandler() { } public YourHandler(JButton b){ theButton = b; } public YourHandler(JTextField tf){ theField = tf; } public void actionPerformed(ActionEvent e) { if(e.getSource() == theButton){ System.out.println(theField.getText()); } } } public class Panel1 extends JPanel{ private JButton Show; private JButton Clear; public Panel1() { Show = new JButton("Show"); Clear = new JButton("Clear"); Show.addActionListener(new YourHandler(Show)); Clear.addActionListener(new YourHandler(Clear)); this.add(Show); this.add(Clear); } } public class YourHandler implements ActionListener{ private static JButton theButton; private static JTextField theField; public YourHandler(JButton b){ theButton = b; } public YourHandler(JTextField tf){ theField = tf; } public void actionPerformed(ActionEvent e) { if(e.getSource() == theButton){ System.out.println(theField.getText()); } } } == 2 of 2 == Date: Wed, Nov 17 2004 7:06 pm From: Andrew Thompson <[EMAIL PROTECTED]> On Wed, 17 Nov 2004 20:39:14 -0600, Oxnard wrote: > I am trying to have 2 JPanels in one JFrame. The first JPanel (Panel1) has > two buttons. The second JPanel has a JTextField. The app works as expected What is 'expected'? > if I have only one button, but if I have a second button the second button > does not work. Gets lazy does it? Have you tried flogging it with a whip? You need to define. - I expected this output. - But got this ouput instead. - The two differ by.. >..I found this example online and would like to expand it to be > able to use more than one button. What do I need to do to get the second > button to do a simple println? Suggestions: Learn OO concepts and how to construct GUI's. Start asking questions on a more appropriate group. <http://www.physci.org/codes/javafaq.jsp#cljh> ..and then when you have the hang of asking well framed questions, move on to a more specific group. <http://www.physci.org/codes/javafaq.jsp#cljh> >..I have seen a number of posting but I am just > not quite getting it. Looking at your code, it seems you have little idea of what you are doing. Your example does not compile, and you could have made changes to allow it to be an SSCCE*. I wrestled with it for ten minutes, but it is not clear what you are trying to achieve, or why you subclassed the JPanels, so I set it aside. For tips on preparing examples for others to see, check.. * <http://www.physci.org/codes/sscce.jsp> HTH -- 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 ========================================================================== TOPIC: How to write an efficient maximum function? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f759ff7cc130859e ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 6:44 pm From: Ahmed Moustafa <[EMAIL PROTECTED]> > private static float maximum(float a, float b, float c, float d) > { > if (a >= b) { > if (a >= c) { > if (a >= d) > return a; > return d; > } > if (c >= d) > return c; > return d; > } > if (b >= c) { > if (b >= d) > return b; > return d; > } > if (c >= d) > return c; > return d; > } > > Notice the regular tree-like structure. > This gives: > - 3 comparisons > - 3 jumps > - 1 copy > > The fastest algorithm yet! And experimentally, that has been found true. But it looks like the overhead of calling the method is very noticeable and dominating when it's being called so many times. == 2 of 2 == Date: Wed, Nov 17 2004 8:41 pm From: "Thomas G. Marshall" <[EMAIL PROTECTED]> Ahmed Moustafa coughed up: >> private static float maximum(float a, float b, float c, float d) >> { >> if (a >= b) { >> if (a >= c) { >> if (a >= d) >> return a; >> return d; >> } >> if (c >= d) >> return c; >> return d; >> } >> if (b >= c) { >> if (b >= d) >> return b; >> return d; >> } >> if (c >= d) >> return c; >> return d; >> } >> >> Notice the regular tree-like structure. >> This gives: >> - 3 comparisons >> - 3 jumps >> - 1 copy >> >> The fastest algorithm yet! > > And experimentally, that has been found true. But it looks like the > overhead of calling the method is very noticeable and dominating when > it's being called so many times. ....which is only more noticeable since the innards of the method are so much faster. A good compiler should really optimize the bejeezers outta the method calling overhead if not remove it outright, at least in the much hyped theory. -- "It's easier to be terrified by an enemy you admire." -Thufir Hawat, Mentat and Master of Assassins to House Atreides ========================================================================== TOPIC: problem with wscompile: xsd:choice not recognized and NullPointerException http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/f43e8bfdd0d9d883 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 6:55 pm From: [EMAIL PROTECTED] (jmc) I am having trouble with wscompile (running jwsdp 1.5). I have validated that I can create the client-side classes by generating from the Google wsdl as a test. When I point at the wsdl I am really interested in for my app, though, I get a number (13) of such warnings: ----------------------------------------------------------------- warning: unsupported XML Schema feature: "xsd:choice" in component {http://Sandl ot/XmlWebServices/}note_edit_response, mapping it to javax.xml.soap.SOAPElement ------------------------------------------------------------------ After these warnings, I get a NullPointerException (see stack trace at end of this posting). I'D BE VERY THANKFUL TO ANYBODY WHO COULD TELL ME HOW TO SOLVE THESE PROBLEMS (unsupported xsd:choice and the NullPointerException). BACKGROUND INFO: I don't get any generated code. I can generate the client-side stubs successfully with a much earlier version of the jwsdp from summer of 2002, I *think* it is version 1.0.01. However, I am not happy with these generated client-side classes and want to try the new jwsdp. Also, I am not the only person seeing this NullPointerException. I found a message from someone who ran into it with jwsdp 1.4, but did not post a solution. I don't know anything about the wsdl the person was using. Here is the posting I saw, in case it is of interest: http://www.newsarch.com/archive/mailinglist/axis/devel/msg03728.html Thanks in advance for any help you can afford. Here is the stack trace I am getting: java.lang.NullPointerException at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOpe rationDocumentLiteralStyle(WSDLModelerBase.java:3580) at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processSOAPOpe ration(WSDLModelerBase.java:909) at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processPort(WS DLModelerBase.java:763) at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.processService (WSDLModelerBase.java:519) at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.internalBuildM odel(WSDLModelerBase.java:354) at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildModel(WSD LModelerBase.java:238) at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelInfo.java: 88) at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java:63) at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.java:714) at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43) at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.commons.launcher.ChildMain.run(ChildMain.java:269) error: java.lang.NullPointerException C:\Sun\jwsdp-1.5\jaxrpc\bin>wscompile -gen -Xprintstacktrace enFromWsdl.xml ========================================================================== TOPIC: J2ME Clie TJ37 http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bddd3f7bc08dbf92 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 7:02 pm From: [EMAIL PROTECTED] (pepperMonkey) "Darryl L. Pierce" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > pepperMonkey wrote: > > > Hi, > > this is my first foray into the J2ME world so please be patient. > > I own a Clie TJ37 (Palm OS 5.2) and was wondering what J2ME > > implementations were available? > > I know of only MIDP4Palm which seems fairly old (Palm OS 3.5+). Is > > there any newer implementations? There is the Websphere Micro Edition > > but that seems to only support Palm Pilots and not Clies. > > Any help would be greatly appreciated. > > I'm not sure, but you might be able to use IBM's WME on the Clie. The > MIDP4Palm implementation you mention is for the MIDP 1.0 specification. I agree that that WME may work for Clie, too bad it is licensed foronly palms. Rather not pay the large sums of $$$ for something that may or may not work for the Clie. Oh well. As for MIDP4Palm being 1.0 spec, yup, that's the reason for the question. :) ========================================================================== TOPIC: different between configure libraries and configure JDKs http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/a3cc5a0b53066f13 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 7:40 pm From: "HS1" <[EMAIL PROTECTED]> Hello all Could you please tell me the differences between them. Can I configure JDKs alone....and do not touch libraries. Thank you SH1 ========================================================================== TOPIC: What is package cache in a jar file http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/dec0c6e21c7d3f0b ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 8:10 pm From: "HS1" <[EMAIL PROTECTED]> Yes, it is created from JBuilder Thanks "Gerbrand van Dieijen" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > On Wed, 17 Nov 2004 20:46:39 +1300, HS1 wrote: > >Hello all > >I know that a jar file is considered as zip file. I see a Jar file that has > >a package cache. Could you please tell me the purpose of this "package" or > >locate a tutorial about content of a jar file... > > JBuilder (Maker/compiler) creates a folder 'package cache' when building > source files, I think it originates from there. > I don't know if other make utilities do that, but it's probably from > JBuilder. > > -- > Gerbrand van Dieijen > ========================================================================== TOPIC: Looking for co-op, internship or volunteer java programmer. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/392330321f8c5f4d ========================================================================== == 1 of 3 == Date: Wed, Nov 17 2004 8:30 pm From: [EMAIL PROTECTED] (Software Consultant) Are you looking for opportunity to gain professional experience in the software development field? Do you have a passion for coding? Are you a quick learner? We are looking for talented java developers to participate in our wireless project. As the team lead, I will provide the architecture and design. You will be responsible to build your assigned module, based on your knowledge. We will guide you and help you to implement your parts. Flexible hours and you can work from home. We do encourage all developers to attend progress meeting. As a small company based in Toronto since 2002, we want you to grow with us. We have the concept and design to work toward a complete end-to-end wireless solution. And you should have the follow skills to qualify building our modules. Should know: Java, UML, SQL, XML, Javascript Nice to know: WAP, HTTPS, Mailet, Servlet, Log4J, Tomcat, Ant, MySQL, Linux Please email resume to [EMAIL PROTECTED] and we will contact qualified candidate for interview. Jimmy == 2 of 3 == Date: Wed, Nov 17 2004 9:42 pm From: "xarax" <[EMAIL PROTECTED]> "Software Consultant" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Are you looking for opportunity to gain professional experience in the > software development field? Do you have a passion for coding? Are > you a quick learner? > > We are looking for talented java developers to participate in our > wireless project. As the team lead, I will provide the architecture > and design. You will be responsible to build your assigned module, > based on your knowledge. We will guide you and help you to implement > your parts. Flexible hours and you can work from home. We do > encourage all developers to attend progress meeting. > > As a small company based in Toronto since 2002, we want you to grow > with us. We have the concept and design to work toward a complete > end-to-end wireless solution. And you should have the follow skills > to qualify building our modules. > > Should know: > Java, UML, SQL, XML, Javascript > > Nice to know: > WAP, HTTPS, Mailet, Servlet, Log4J, Tomcat, Ant, MySQL, Linux /snip/ Let me get this straight. You want someone to donate their skills (listed above) to benefit your company? == 3 of 3 == Date: Wed, Nov 17 2004 9:53 pm From: Chris Smith <[EMAIL PROTECTED]> xarax <[EMAIL PROTECTED]> wrote: > Let me get this straight. You want someone to donate > their skills (listed above) to benefit your company? The part that was most amusing to me was that, after all this, he asked for resumes to prove qualifications, and said he'd contact people to interview them. Ha! -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: Need as much help as possible http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/7c8e64b34d7154d8 ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 8:43 pm From: [EMAIL PROTECTED] (Chinnmaya Murali) "Thomas G. Marshall" <[EMAIL PROTECTED]> wrote in message news:<[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. isn't that offensive to people belonging to a particular country? yes, i belong to India. chinnmaya ========================================================================== TOPIC: 'A'++ == 'B': Always True? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/bb79b41e32f311b2 ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 9:43 pm From: Chris Smith <[EMAIL PROTECTED]> steve <[EMAIL PROTECTED]> wrote: > as long as you "assume" you are using the western alphabet. > > It would break on all south asian languages ( taiwan/China /Japan), I would > guess any language using picto- grams ,would mess it up. No, that's not correct. Fritz, please pay attention to other answers. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation == 2 of 2 == Date: Wed, Nov 17 2004 9:50 pm From: Chris Smith <[EMAIL PROTECTED]> Doug Pardee <[EMAIL PROTECTED]> wrote: > Okay, everyone's been running all over the place with this one, > dragging in all sorts of irrelevant stuff like Oriental languages. Yes, and it's been such fun. ;) > First, the character constant 'A' will *always* result in the char > value of \u0041. This is defined by chapter 3 of the Java Language > Specification (second edition) and by the nature of Unicode. Anyone who > thinks that Oriental languages matter doesn't understand the whole > point of Unicode: it combines ALL language 'glyphs' into a single > unambiguous numbering system. Unicode values \0000-\007F always > represent ASCII codes 0-127, okay? I think you missed the point of Michael's response. That was that if the source file was written in a text editor, and then saved in some encoding that doesn't represent the character A, then the input to the compiler could be wrong, and hence the result would be wrong. It's a silly little exercise in abstract thought, and not really meant for the OP at all. If you insist on making me take a side, it would be that this possibility is irrelevant in discussing the result of Fritz's code anyway, since in this scenario Fritz's code never really gets run. I'd consider this analogous to proposing that disk corruption of the class file might cause the wrong result. Nevertheless, despite by disagreement with the semantic matter, I believe Michael understands unicode quite well. > But! We cannot say absolutely for sure what will be printed. [...] > A counter-example would be if > you were running on an IBM mainframe, I don't think that's relevant. A typical EBCDIC machine would take a different route to get there, but the resulting output would still be an 'A' followed by a 'B'. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: Displaying blank JLabel Icon. http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/8787f391c42b6a42 ========================================================================== == 1 of 2 == Date: Wed, Nov 17 2004 9:49 pm From: "Ken Adams" <[EMAIL PROTECTED]> How do you go about displaying a blank(invisible) JLabel Icon. Basically I have a JLabel that represents a playing card, and when the player isin't playing I want to set his Icon to be clear, I need to actually set an Icon because I don't want the panel it's in to be resized. Any suggestions. I suppose I got probably just setVisible(false) then true when I need it again but I would prefer another way. Thanks == 2 of 2 == Date: Wed, Nov 17 2004 10:02 pm From: Chris Smith <[EMAIL PROTECTED]> Ken Adams <[EMAIL PROTECTED]> wrote: > How do you go about displaying a blank(invisible) JLabel Icon. Basically I > have a JLabel that represents a playing card, and when the player isin't > playing I want to set his Icon to be clear, I need to actually set an Icon > because I don't want the panel it's in to be resized. Any suggestions. I > suppose I got probably just setVisible(false) then true when I need it again > but I would prefer another way. Thanks If you want to use an image that just doesn't appear, you can create a new transparent BufferedImage, and construct an ImageIcon from that. Or, a little more work but less resource-hungry, you could define a simple Icon implementation that knows its width and height but does nothing when asked to paint itself. -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ========================================================================== TOPIC: Hardware spec published? http://groups-beta.google.com/group/comp.lang.java.programmer/browse_thread/thread/de3a1ca8e469825c ========================================================================== == 1 of 1 == Date: Wed, Nov 17 2004 9:56 pm From: Chris Smith <[EMAIL PROTECTED]> VisionSet <[EMAIL PROTECTED]> wrote: > Does sun produce a hardware spec for swing? > eg graphics card/cpu specs? Such a thing doesn't make much sense, since Swing doesn't include any hardware. What, exactly, do you want to know? -- www.designacourse.com The Easiest Way To Train Anyone... Anywhere. Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation ======================================================================= 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
