|
Jo posted:This is from HOLDING the 's' key. Why would multiple key events be generated from a single key hold? http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4504217 Edit: To clarify, basically you can't depend on the events reflecting an accurate state of the keyboard. Rather, record the key presses on a timer and set the state of movement accordingly. That way you standardize performance across all platforms. baquerd fucked around with this message at 09:15 on Nov 12, 2010 |
# ? Nov 12, 2010 09:04 |
|
|
# ? Jun 13, 2024 05:30 |
baquerd posted:http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4504217 Oh. Thanks! EDIT: Turns out there's a better way to do this. KeyBindings is the Swing equivalent of KeyListener. Jo fucked around with this message at 01:02 on Nov 14, 2010 |
|
# ? Nov 12, 2010 09:12 |
|
Hey, can we talk about web services? Java offers a ludicrous number of options for developing and deploying web services, and I'm curious as to how you guys usually do it, and why. For example, I'm trying to dip my toes into web services by developing some RESTful methods in JAX-RS using Jersey, and I'd hate to spend several days mastering this only to learn that most Java shops use SOAP services instead.
|
# ? Nov 14, 2010 19:26 |
|
My work uses RESTful URLs. Our requests are fairly simple, so I would think that, if you have extremely complex requests (which can only be simplified otherwise by maintaining state on the server), you might want to go with SOAP. My general sentiment is that, more times than not, most anything that is currently accomplished in SOAP can be done with RESTful URLs, and those are typically very much easier to consume.
|
# ? Nov 15, 2010 00:50 |
|
Chairman Steve posted:My work uses RESTful URLs. Our requests are fairly simple, so I would think that, if you have extremely complex requests (which can only be simplified otherwise by maintaining state on the server), you might want to go with SOAP. My general sentiment is that, more times than not, most anything that is currently accomplished in SOAP can be done with RESTful URLs, and those are typically very much easier to consume. Based on the learning I've done thus far on this subject, I think I'd agree with you. Even for web services where I'll be using XSDs, RESTful services should do the job nicely, and more intuitively to boot. Then again, I haven't yet researched the advantages of SOAP in regards to security, which is where I'd really have an uphill battle at work...
|
# ? Nov 15, 2010 03:28 |
As a start, I'd like to apologize for spamming requests to help to this thread without really contributing. Thank you to all those who have provided feedback to my inane problems. The most recent issue, a change from the AWT method of input to the Swing method of input, has left me daft. The following code does not work for reasons I can't explain. code:
|
|
# ? Nov 15, 2010 07:21 |
|
I may be wrong, but I think that content panes, not being input widgets, never get input focus. edit: I think that input map is for things like text boxes so you can do things like automatically updating a search as you type, etc.
|
# ? Nov 15, 2010 16:13 |
Paolomania posted:I may be wrong, but I think that content panes, not being input widgets, never get input focus. Ah. Okay. Thanks.
|
|
# ? Nov 15, 2010 16:35 |
|
I need a Web UI framework suggestion: I need to develop an UI which is built from portlets (nonono, not those Portlets but, you know, similar), basically bunch of boxes showing content streams. What I've found out that I like either strict templating (GSP in Grails) or full-blown component oriented design with clear separation of markup and code (Apache Wicket) but I don't neither of those are applicable here exactly: If I were to build the UI part in Grails, I would have to create a whole layer of integration to code I already have and if I were to use Wicket, the actual dynamic amount of portlets and such would be a relative pain (been there, done that). So, what would you suggest as an intermediary? Note that I specifically do NOT want a RIA application, which should be read as "no GWT, thank you".
|
# ? Nov 15, 2010 18:04 |
|
Parantumaton posted:I need a Web UI framework suggestion: Can you be more clear about what you mean by "a whole layer of integration" if you went with Grails? What does your current code base do exactly?
|
# ? Nov 15, 2010 18:09 |
|
MariusMcG posted:Based on the learning I've done thus far on this subject, I think I'd agree with you. Even for web services where I'll be using XSDs, RESTful services should do the job nicely, and more intuitively to boot. Then again, I haven't yet researched the advantages of SOAP in regards to security, which is where I'd really have an uphill battle at work... I'd say keep authentication and authorization separate from the API's language. Use something like OpenID to authenticate (which opens you up to allowing people to log in using things like their GMail account) and OAuth to authorize users. Otherwise, you'll have to deal with things like sharing of keys to encrypt the SOAP request, which would probably contain your username and password, when it's sent from the client to the server.
|
# ? Nov 16, 2010 04:04 |
|
Is there a good way to add a lot of buttons and link them with an actionlistener? I need to make a calculator for my class and I find that my code is just painful to look at. Since I have like 16 buttons and I have to create them and then add them to the panel and then link all of the actionlisteners, my code is looking kind of ugly. I tried setting up an array of buttons which would use a for loop to go through the array and create the buttons but I kept getting a null pointer error
|
# ? Nov 17, 2010 01:04 |
|
Stealthgerbil posted:Is there a good way to add a lot of buttons and link them with an actionlistener? I need to make a calculator for my class and I find that my code is just painful to look at. Since I have like 16 buttons and I have to create them and then add them to the panel and then link all of the actionlisteners, my code is looking kind of ugly. I tried setting up an array of buttons which would use a for loop to go through the array and create the buttons but I kept getting a null pointer error If I've got to create a lot of buttons or something for a UI I sometimes use a helper class to actually build them and then pass them to the main UI class, keeps things a little cleaner. If you've got them in an array you should be able to add your actionlister to all of like this: code:
code:
chippy fucked around with this message at 01:52 on Nov 17, 2010 |
# ? Nov 17, 2010 01:45 |
|
p.s.code:
code:
|
# ? Nov 17, 2010 01:50 |
|
I suspect you got the NullPointerException because you created an array of Button objects, but didn't actually create the buttons themselves:code:
code:
|
# ? Nov 17, 2010 04:45 |
|
Outlaw Programmer posted:
Is it good form to create actionPerformed(ActionEvent evt) like this? i.e. within the same code that creates the button. I know there are multiple ways of doing it like creating a seperate class to be your actionListener or defining the methods in your UI class, and this always seems like the messiest way of doing it to me. Although I guess this way you can define a different actionPerformed method for each button. I usually have them all call the same method and then have that method examine ActionEvent to work out where it came from and what to do.
|
# ? Nov 17, 2010 12:37 |
|
chippy posted:Is it good form to create actionPerformed(ActionEvent evt) like this? i.e. within the same code that creates the button. I know there are multiple ways of doing it like creating a seperate class to be your actionListener or defining the methods in your UI class, and this always seems like the messiest way of doing it to me.
|
# ? Nov 17, 2010 13:03 |
|
TRex EaterofCars posted:Can you be more clear about what you mean by "a whole layer of integration" if you went with Grails? What does your current code base do exactly? First: Sorry for phasing out for a couple of days, I was kinda busy. Anyway, the app I have has just about everything home grown; there's a certain point for everything such as saving stuff and querying data in general and everything's wonderfully intertwined which makes it really hard to express the whole thing as a logical bunch of for example Grails Services (or Spring Beans or whatever). Even if it could be expressed as such, I still need to be able to do all kinds of on-demand data updates which are not tied to, say, user session which rules Wicket out quite quickly due to its Ajax implementation. Anyway, what I need the UI framework to do is to provide me with a good way to integrate 100% custom Ajax with the JS library of my choice (that'd be jQuery) while still managing the tedious stuff such as repeaters and initial states for me. I have been thinking that I may need to go "full Ajax" here but that would mean that all those without JS enabled would be left out of the UI goodness. Hopefully this at least somewhat helps you.
|
# ? Nov 17, 2010 18:57 |
|
Parantumaton posted:First: Sorry for phasing out for a couple of days, I was kinda busy. I honestly don't know of anything for the UI that would be able to just do all that work for you, while being all AJAX cool and everything. Grails has scaffolding that would set up a lot of the minutiae for you, but you'd still have to customize it. If you find something that will just "take" your classes and make easily extendable poo poo for you please let me know cause I would certainly use it. But for the back end, would you be able to expose your home-grown application as a set of webservices (whether REST or SOAP or whatever) and then write a smaller, front-end-oriented application? I've done this before and it worked really well, you basically treat the legacy application as a black box database and query it via the webservices on-demand. In fact, in grails I would probably just write a plugin to autoinject the webservice CRUD garbage into a set of classes like the domain classes get with hibernate.
|
# ? Nov 17, 2010 21:56 |
Is Java the right choice for a cross platform desktop application these days?
|
|
# ? Nov 17, 2010 23:11 |
|
fletcher: Who is your target audience? What kind of UI experience are you working with? Minecraft is a pretty good example of a popular desktop application written in Java and released for OSX, Windows and Linux. At the same time, it does not attempt to match the look and feel of any of these operating systems. Will your users already have the Java runtime installed? I know that OSX comes bundled with Java, but I don't think Windows does. On Linux I've noticed most distributions seem to run IcedTea by default, which is pretty flaky in my experience. If you plan to offer a Linux release, I'd recommend testing against this configuration. Finally, if you're using the Java 2D graphics infrastructure for anything, be aware that the performance of implementations varies.
|
# ? Nov 17, 2010 23:37 |
Internet Janitor posted:fletcher: Who is your target audience? What kind of UI experience are you working with? I want to write a simple database schema browser/query utility. The only one that currently exists for the database I'm using is an old Windows Forms application and it is absolutely terrible in terms of UI and functionality. I'd like for it to match the look and feel of whatever OS the user is in, but it's not an absolute necessity. I'm not really interested in making it look fancy, I just want it to be as simple as possible. I won't be using any of the Java 2D stuff. I'm guessing that if people don't already have the Java runtime installed their hatred of the existing application will make that an easy decision. fletcher fucked around with this message at 00:25 on Nov 18, 2010 |
|
# ? Nov 18, 2010 00:17 |
|
fletcher posted:I want to write a simple database schema browser/query utility. The only one that currently exists for the database I'm using is an old Windows Forms application and it is absolutely terrible in terms of UI and functionality. http://www.dbvis.com/
|
# ? Nov 18, 2010 00:30 |
|
Edit: Double Post
maskenfreiheit fucked around with this message at 21:32 on Mar 13, 2017 |
# ? Nov 18, 2010 00:54 |
TRex EaterofCars posted:http://www.dbvis.com/ Haven't seen that before, thanks for the link. Seems to be overkill of what I want though, and it doesn't support the database I'm using. I don't even want it to be able to edit the schema. I just need to be able to view what tables and fields exist, run queries, and export the output as a csv.
|
|
# ? Nov 18, 2010 00:55 |
|
fletcher posted:Haven't seen that before, thanks for the link. Seems to be overkill of what I want though, and it doesn't support the database I'm using. I don't even want it to be able to edit the schema. I just need to be able to view what tables and fields exist, run queries, and export the output as a csv. It'll support any database with a JDBC driver... If you were even considering targeting Java you should make sure there's a JDBC driver available for your database before you get much further.
|
# ? Nov 18, 2010 01:43 |
TRex EaterofCars posted:It'll support any database with a JDBC driver... If you were even considering targeting Java you should make sure there's a JDBC driver available for your database before you get much further. Interaction with the database is all done through SOAP, the underlying database is not exposed directly. They provide a Java library that I'm pretty comfortable using, which is one of the main reasons I was considering Java in the first place. I've already got a little prototype app that displays the schema and lets me execute queries, I'm just wondering if there's any other platforms I should consider doing this in before I invest more time in the Java route.
|
|
# ? Nov 18, 2010 02:42 |
|
GregNorc posted:what's a good IDE that will let me drag and drop JButtons etc to rapid prototype UIs? Eclipse + VisualSwing4Eclipse or NetBeans.
|
# ? Nov 18, 2010 03:14 |
|
fletcher: Based on your description, sounds like Java will do just about exactly what you want. More power to ya.
|
# ? Nov 18, 2010 05:39 |
Internet Janitor posted:fletcher: Based on your description, sounds like Java will do just about exactly what you want. More power to ya. Should I be concerned that Swing is no longer actively developed? Should I not be using it? How about the SwingLabs stuff? Or Better Swing Application Framework? fletcher fucked around with this message at 21:48 on Nov 18, 2010 |
|
# ? Nov 18, 2010 19:30 |
|
Spring is a web framework, and Swing will be supported for a long time to come. The SwingLabs has some cool stuff that you can use, but I don't see too many people using it in the future for any serious desktop applications. Java FX was supposed to be this awesome thing that would save desktop Java applications but that didn't pan out. My opinion is that Java desktop applications are dead, and if not that at least a second class citizen on the platform.
|
# ? Nov 18, 2010 21:31 |
MEAT TREAT posted:Spring is a web framework, and Swing will be supported for a long time to come. The SwingLabs has some cool stuff that you can use, but I don't see too many people using it in the future for any serious desktop applications. Whoops, I meant to say Better Swing Application Framework. Googling around and reading message boards about it I get the same feeling that it is dead/dying.
|
|
# ? Nov 18, 2010 21:48 |
|
Can someone help me out with Java versioning? I'm on a DoD network; both 5.0 update 22 and 6.0 update 20 are deployed enterprise-wide. Unofortuantely; Java 5.0 is no longer listed as secure, and as such requires either: - Update 26 - Removal across all hosts We dont have a Java for business contract; however administrative removal is simple. Its 6.0 backwards compatable with 5.0 Java applications? This page: http://www.oracle.com/technetwork/java/javase/compatibility-137541.html Is a bit unclear to me. Can anyone tell me whether removing 5.0 and ensuring 6.0 is installed would be viable? I'm sure it at least partially depends on the applications - but before I dig, and audit all our hosts and determine what applications are running it, I want to be sure I'm not wasting shitloads of time, when I'm just going to need my higher-ups to purchase the support contract..
|
# ? Nov 18, 2010 22:02 |
|
Well, you should never upgrade JVMs without rigorous testing, but in general it should work.
|
# ? Nov 18, 2010 22:18 |
|
rjmccall posted:Well, you should never upgrade JVMs without rigorous testing, but in general it should work. Tight deadline; security requirement for DoD compliance. Very tight schedule. Otherwise I 100% completely agree.
|
# ? Nov 18, 2010 22:32 |
|
Walked posted:Tight deadline; security requirement for DoD compliance. Very tight schedule. Otherwise I 100% completely agree. Are you going to compile new code or just run stuff on a new JVM? That'll determine how much bullshit you will have to go through.
|
# ? Nov 18, 2010 23:29 |
|
I had finally finished this program that I was writing for work, but my boss wanted me to upload it under a different name than what I had called it originally (ie- adding an "_2"). Ever since doing that this red exclamation mark won't go away and any changes that I make to the code don't get made whenever I compile and test it. I'm working in Eclipse on a Vaadin project titled "AddressSearch_2". Can any goons tell me how to fix this? ninja edit: Black bars are covering my company's name. Ignore them.
|
# ? Nov 19, 2010 17:51 |
|
Jewbert Jewstein posted:I had finally finished this program that I was writing for work, but my boss wanted me to upload it under a different name than what I had called it originally (ie- adding an "_2"). Ever since doing that this red exclamation mark won't go away and any changes that I make to the code don't get made whenever I compile and test it. I'm working in Eclipse on a Vaadin project titled "AddressSearch_2". I have the same problem occasionally in Netbeans. The way to fix it there is to delete the cache folder where it stores all the information about source files and restart. When it restarts, it will have to rebuild the cache, and the issue should go away. I would guess there's a similar procedure you can follow for Eclipse.
|
# ? Nov 19, 2010 19:49 |
|
Jewbert Jewstein posted:Can any goons tell me how to fix this?
|
# ? Nov 19, 2010 20:12 |
|
|
# ? Jun 13, 2024 05:30 |
|
Jewbert Jewstein posted:Can any goons tell me how to fix this? Try cleaning the project and rebuild it. Eclipse's autobuild can do funny things.
|
# ? Nov 20, 2010 19:17 |