|
1337JiveTurkey posted:You might try flatworm although I haven't personally tried it. This just might work. Time to try it out on a demo in spare time and then go through legal hell hole.
|
# ? Aug 22, 2013 17:53 |
|
|
# ? May 9, 2024 08:59 |
|
I'd like to have a component in my interface that would be almost like JTree, except horizontal. Sort of. Actually JTree is my fall-back idea, but the ideal situation is a JList (or JTable?) in which rows can be grouped, and the grouping indicated by an editable label positioned to the side and center of the group. Sorry, I've looked around for something to illustrate this with but haven't found anything useful quickly. And I'd dearly wish to preserve standard component functionality, instead of having to go up from textfields and labels. Is there a way?
|
# ? Aug 24, 2013 06:18 |
|
supermikhail posted:I'd like to have a component in my interface that would be almost like JTree, except horizontal. Sort of. Actually JTree is my fall-back idea, but the ideal situation is a JList (or JTable?) in which rows can be grouped, and the grouping indicated by an editable label positioned to the side and center of the group. Sorry, I've looked around for something to illustrate this with but haven't found anything useful quickly. Netbeans has a component like this. The netbeans platform that is. https://netbeans.org/features/platform/download.html
|
# ? Aug 24, 2013 14:24 |
|
Oh drat, I hope it works with eclipse projects well. Also, I guess it's good thing that I worked on saving window state manually. Also, maybe my Ubuntu computer has gotten better at handling Netbeans (or Netbeans takes less memory now). Anyway, thanks. Edit: Okay, what's it called and how do I get it? supermikhail fucked around with this message at 16:13 on Aug 24, 2013 |
# ? Aug 24, 2013 14:50 |
|
So I am taking a Java class this semester and the first project is to take user inputs, display them, and multiply them. When I try the method below, It'll do whole numbers fine, but it hates decimals spitting "java.lang.NumberFormatException" back at me. Any ideas?code:
|
# ? Aug 26, 2013 18:25 |
|
Your answer is in your question. Think on this linecode:
|
# ? Aug 26, 2013 18:37 |
|
lamentable dustman posted:Your answer is in your question. Think on this line I forgot what an integer was. Can only use whole numbers. Is there a way to salvage this or should I scrap that and look for something else?
|
# ? Aug 26, 2013 18:59 |
|
KildarX posted:I forgot what an integer was. Can only use whole numbers. Is there a way to salvage this or should I scrap that and look for something else? You're not going to make it work with int x and int y, no, but check out Double.parseDouble. ...or java.text.DecimalFormat.parse, but Double.parseDouble is probably easier. ulmont fucked around with this message at 19:04 on Aug 26, 2013 |
# ? Aug 26, 2013 19:02 |
|
ulmont posted:You're not going to make it work with int x and int y, no, but check out Double.parseDouble. Thanks for the help man, works well.
|
# ? Aug 26, 2013 19:51 |
|
FYI, please never use doubles for money in a program that matters.
|
# ? Aug 27, 2013 02:01 |
|
I know its not really Java but at the weekend i was looking to do some work with minecraftforge and create my own Mod, I am an Intellij Idea girl and have purchased my own copy. Could i get it working ? NO Could i get help in getting it working in Idea? NO The advice I got from the IRC support was Use Eclipse as we include a preconfigured Workspace Why can't they be open and tell us how to get it working in ALL IDEs rather than just their favorite version, as I don't want the hassle of 3-4 IDEs on my system when I mainly use 1 . (3-4 includes, Idea, Eclipse, Netbeans, JCreator(yes i bought this one as well))
|
# ? Aug 27, 2013 09:35 |
|
TheresaJayne posted:I know its not really Java but at the weekend i was looking to do some work with minecraftforge and create my own Mod, https://www.youtube.com/watch?v=FecJUj6fq9I
|
# ? Aug 27, 2013 10:10 |
|
TheresaJayne posted:
Could be for that very reason. Luckily Eclipse can work completely standalone without having to install anything. Grab a zipped version, unzip it somewhere, copy jre-folder from your Java installation inside its folder, done.
|
# ? Aug 27, 2013 11:42 |
|
Brain Candy posted:FYI, please never use doubles for money in a program that matters. I wish more people would get this through their heads. Just the other day, the senior developer on my team was saying I don't know why the currency values in a soap response were not being in \d*.\d{2} format. I pointed out that it was because he was using doubles and you never want to do currency in doubles. Starting to wonder who the real senior developer is.... TheresaJayne posted:I know its not really Java but at the weekend i was looking to do some work with minecraftforge and create my own Mod, Speaking as someone who has used multiple IDEs. It can be very hard for me to figure out how to make something work in a new IDE when I'm used to my current one. Being lazy as most programmers are, I will help someone work through getting stuff running on their IDE if I have a license or it is free, and I will appreciate them making a guide. However, I feel no need to help them. Then again, in terms of Java, I tend to use maven for everything! HFX fucked around with this message at 19:00 on Aug 27, 2013 |
# ? Aug 27, 2013 18:57 |
|
TheresaJayne posted:I know its not really Java but at the weekend i was looking to do some work with minecraftforge and create my own Mod, Come in #technicdev on synirc sometime and ask around. I'm going to PAX in a couple hours but next week I can be around to step you through it OR someone in the channel might be able to help you anyway. We have a bunch of modders in the channel. Make sure you stick around and idle though because it's not active at all hours of the day but people will come back and read the logs and ping you/pm you responses.
|
# ? Aug 29, 2013 05:12 |
|
General Olloth posted:Come in #technicdev on synirc sometime and ask around. I'm going to PAX in a couple hours but next week I can be around to step you through it OR someone in the channel might be able to help you anyway. We have a bunch of modders in the channel. Well i did the easy way and installed Eclipse, at some point i will work out the config and probably post a blog entry showing how to set it up on Idea.
|
# ? Aug 29, 2013 13:30 |
|
I'm trying to make it so I would type in a textfield, and get the key event, but without anything actually happening in the textfield, so I could set the text programmatically. My only lead thus far is the KeyEventDispatcher interface, but I'm not sure it's what I want, and even if it were I don't know how to connect it to the textfield. Any help? Edit: Nevermind, Component's processKeyEvent works splendidly. supermikhail fucked around with this message at 10:10 on Aug 30, 2013 |
# ? Aug 30, 2013 10:03 |
|
I'm having problems with a stupid little format called VLI, and it's driving me nuts. Here's the link to the so-called specification: http://rpg.hamsterrepublic.com/ohrrpgce/RELOAD#VLI_.28Variable_Length_Integer.29 and here's the code I'm trying to read it in with: http://code.google.com/p/hamsterwrench/source/browse/trunk/src/hamsterwrench/data/reload/ReloadDataManager.java#266
|
# ? Aug 30, 2013 22:45 |
|
What precisely is the problem you're having? I'll take a look, but it's hard to debug "my code doesn't work!"
|
# ? Aug 31, 2013 02:07 |
|
I'll get a RELOAD test file uploaded soon. I think the problem lies in readVLI. e: Here's the file I'm using: https://www.dropbox.com/s/ghzpjmsnh4kftfj/0.rsav It's a valid RELOAD file since the OHRRPGCE opens it perfectly. Danny Glands fucked around with this message at 03:58 on Aug 31, 2013 |
# ? Aug 31, 2013 03:08 |
|
Okay, but what is the error? What are you trying to do that does not get done, and in what way does it fail?
|
# ? Aug 31, 2013 04:34 |
|
It misjudges node sizes, so that if it runs into a mis-sized node, it starts reading in garbage if the file pointer reads a valid nodetype (if it's a string it shows garbage in the System.out) and it's supposed to crash if the node type is higher than six. If you want a log file I'll gladly produce it.
|
# ? Aug 31, 2013 04:41 |
|
No, that's enough information. You're right that the readVLI function is the problem; it's checking some random other value when it tries to check the continuation flag. The check needs to be on the raw byte, not the value after masking the flag and shifting by the current offset.
|
# ? Aug 31, 2013 04:46 |
|
The fix worked, thank you.
|
# ? Aug 31, 2013 05:16 |
|
I'm trying to cheat and highlight part of a JLabel with html, but having very sporadic luck so far (it doesn't help that my experience with html is almost non-existent). bgcolor sets what it says to what I want, but it needs a legitimate tag to go with, and everything I've tried newlines the rest of the text (at least <div> which shouldn't). Is there a non-violent solution to this?
|
# ? Sep 2, 2013 18:30 |
|
I don't know specifically, but in html don't you usually use <span> for that?
|
# ? Sep 2, 2013 18:31 |
|
Dammit, that's taken some suffering. But thanks... I thought <div> did the same thing! For anyone interested, what I did is code:
supermikhail fucked around with this message at 20:20 on Sep 2, 2013 |
# ? Sep 2, 2013 20:17 |
|
Does anyone know of a video or series of videos that give a sort of "refresher course" on Java basics? I took a Java class a couple years ago and now I'm getting back into it, and I remember some things, but vaguely. I'd love something that is at more of a brisk pace because I'm not learning it for the first time.
|
# ? Sep 2, 2013 21:03 |
|
So, I'm trying to figure out how to loop a program, and I can't figure it out. The purpose of the below bit of code is to ask for a number, return text based on the number and continue asking for inputs until someone inputs a negative number then it quits. I don't know how to, I guess, erase the previous string and use new inputs.code:
Defenestrategy fucked around with this message at 21:37 on Sep 9, 2013 |
# ? Sep 9, 2013 21:34 |
|
You can reassign a variable after it is created. z = input.next(); is valid even if z is already set to something else. After that statement, z will be set to the result of input.next(), which will be what the user input that time. Think about how often you need to get input from the user compared to how often you check the value of that input in those if statements. Also, it would probably help to clean that code up a bit: Java code:
carry on then fucked around with this message at 22:06 on Sep 9, 2013 |
# ? Sep 9, 2013 22:03 |
|
e:
|
# ? Sep 9, 2013 22:05 |
|
Hint: in the code you posted, you're only asking for input once
|
# ? Sep 9, 2013 22:13 |
|
carry on then posted:Tell me, where else in this code should you be asking for input (and converting it!), do you think? Probably after the system.exit(1) and still within the while; if I do something like this: code:
|
# ? Sep 9, 2013 22:24 |
|
Okay, so you'll ask for input for each iteration. But the raw input isn't what you're checking when determining what to do
|
# ? Sep 9, 2013 22:28 |
|
404notfound posted:Okay, so you'll ask for input for each iteration. But the raw input isn't what you're checking when determining what to do derp code:
|
# ? Sep 9, 2013 22:36 |
|
I have a problem with trying to sort a group of three integers input from a text file from smallest to largest. I know of a function to do exactly that, Arrays.sort(), but it will just print out memory addresses and not the three integers. For example, my text file would start with a Scanner "sc" that reads in a text file starting with 3 numbers, x, y, and z, and the code is this: code:
|
# ? Sep 9, 2013 22:39 |
|
= makes the left hand side take the value of the right hand side. which of x or sortingArray[0] gets the value from the scanner?
|
# ? Sep 9, 2013 22:41 |
|
Your assignments are backwards. x = sortingArray[0] should be sortingArray[0] = x
|
# ? Sep 9, 2013 22:42 |
|
KildarX posted:Thanks for all your collective help. One more thing you can do to clean up the code. I'm assuming you fixed the code by asking for input both before the while loop and also within the loop at the end. While this works, duplicating code is generally frowned upon. You can get by with using just one copy of the input code by putting it inside the loop at the beginning, and then changing from while to do-while. Java code:
404notfound fucked around with this message at 22:49 on Sep 9, 2013 |
# ? Sep 9, 2013 22:47 |
|
|
# ? May 9, 2024 08:59 |
|
Posting Principle posted:Your assignments are backwards.
|
# ? Sep 9, 2013 23:03 |