« first day (1421 days earlier)      last day (3503 days later) » 

5:57 AM
hi guys anyone there
 
@user2652051 no
Happy Internetional programmers' day!!!
 
wish you the same
?
anyone knows jsf
 
Me not unfortunately.
 
6:33 AM
morning!
@kiheru in reality it's the fault is of another one
In a logout servlet I destroy the session and redirect to index, but pressing the back button I can see the HTML content again. Is this OK?
I read about PRG but that's about Forms and data dupe, not my case
 
room topic comment changed: -- Happy International Programmers' Day!
 
 
1 hour later…
8:00 AM
where is the javafx tag ?
:-(
@Uni is @Kylar on leave ?? I miss him here..
 
@ItachiUchiha I actually don't know..
 
hmm..
so what are you upto ?
wrking on bukkit ??
 
Morning everyone
Happy Programmers day
Happy birthday to me
 
Heya
 
coincidence?
 
8:03 AM
same to you
is it yur birthday ?
 
Enjoying the weekends, moderating the site as usual.
 
I was born to be a programmer!
 
Happy birthday!
 
Ty :D
 
Happy birthday!
 
8:04 AM
Happy Birthday !
 
Thanks guys :)
 
@ItachiUchiha Yeah. Bukkit is dead now though.
 
@kiheru copied @Uni greetings :P
@Uni dead for minecraft as well ?
 
Great minds think alike @kiheru :)
 
@uni I got a feeling you deleted my lonely mesages :P
 
8:05 AM
Copy-paste greeting?
 
look at the 'b' in birthday in both your wishes
 
in SO Close Vote Reviewers, 2 days ago, by rene
given the current legal battle can't we just burinate that tag and delete vote all its questions?
 
:-P :-P
 
in SO Close Vote Reviewers, 2 days ago, by Unihedron
@rene Thanks. This blog post sums up my standpoint thoroughly. I mourn the current conditions and legal issues of it as well. I'll let you know when it's out of hope.
 
so does it mean that minecraft will stop using bukkit ?
 
8:15 AM
No, there is just no more bukkit.
It's illegal and they took it down.
Bukkit-related builds are also dead.
in The SO Tavern (Free Snacks), Sep 8 at 16:44, by Unihedron
@Joiner Spigot is dead too. I'm not sure what to look for now.
 
8:34 AM
how to you check if a button has a border
Got it
doesn't work
 
Depends on what that means. Components can have borders (multiple implementations) that can be obtained with getBorder(), if it's something in the button itself, it's theme specific
 
private void undoPossibleMoves() {
		for(int i=0; i<8; i++){
			for(int j=0;j<8;j++){
				int targetX = i;
				int targetY = j;
				if(grids[targetX][targetY].getBorder() == Color.RED){
					grids[targetX][targetY].setBorder(null);
				}
			}
		}
	}
This is what I want to undo
private void selectPossibleMoves(int highlightedX, int highlightedY) {
		for(int i=0; i<8; i++){
			for(int j=0;j<8;j++){
				int targetX = i;
				int targetY = j;
			    Border possibleMove = new LineBorder(Color.RED, 3);
				if ((targetX - highlightedX) == -1 && Math.abs(targetY - highlightedY) == 1){
					grids[targetX][targetY].setBorder(possibleMove);
				}

			}
		}
	}
 
(To make it more confusning, no border does not necessarily mean a null border. There are invisible Borders)
 
ohh
 
this:
grids[targetX][targetY].getBorder() == Color.RED)
is always false. The border can never be a color
 
8:39 AM
what is it then?
but this Border possibleMove = new LineBorder(Color.RED, 3);
 
it's a LineBorder, apparantly
 
@Uni so how will you now code for minecraft ?
 
You could make that border instance once somewhere, and then compare to that
 
ah
okay
 
@ItachiUchiha We're building our own interface that copes with the Minecraft Client protocol.
 
8:41 AM
(It does not matter if you want to use it in more than one place. Borders can be shared, unlike Components)
 
may be its a good time you people can build a API for it
 
private void undoPossibleMoves() {
		for(int i=0; i<8; i++){
			for(int j=0;j<8;j++){
				int targetX = i;
				int targetY = j;
				Border possibleMove = new LineBorder(Color.RED, 3);
				Border impossibleMove = new LineBorder(Color.BLUE, 3);
				if(grids[targetX][targetY].getBorder() == possibleMove){
					grids[targetX][targetY].setBorder(impossibleMove);
					System.out.println("lol");
				}
			}
		}
	}
No luck I used a syso as trace, it doesn't reach there
that's very weird
 
because it's a new instance. it does not equal in == sense (I'm not sure if it equals in equals())
I'd make these fields. Then you're guaranteed to have the same instance always
 
aha
okay
 
You're using them all the time anyway, so it makes sense to create them only once
 
8:48 AM
perfect :D
Yep
i just had to make them private instance vars.
I realise they do actually get created everytime
so it's not actually comparing to the actual thing :)
 
@kiheru It's important to override equals() in classes.
 
It's important, but I would not rely on it being always done, without checking the docs. Not even on the standard library
 
What is the good way to send data from one JFrame to another?
 
2 questions:
Why use super();
2. what does @override actually do
I use them but I honestly dunno why. I saw them in examples so I use them
 
rtfm
 
8:51 AM
yes rtfm
 
@M.S. what data?
 
Data like JTextField value or JComboBox selectedItem (Which is not String)
 
Can you pass in a method?
 
yes, but how?
 
8:54 AM
is there other way than passing through method?
 
write in field? if it's not accessible use reflection
 
ok
thanks @Unihedron
How to get Checked Button from `ButtonGroup`?
This is not working:
`buttonGroup1.getSelection().toString()`
 
About the @Override I can say though, that the language does not require it, and it makes no difference whatsoever when running the code. But it's good practice, and if your compiler settings do not produce a warning for a missing @Override, change the settings. Prevents a lot of silly bugs. (C# had the benefit of hindsight, and made override a mandatory specifier)
 
Aha
C++ or C first?
I actually bought a c++ book before joining college but never got the chance to read/use it
 
Compared to java. C does not have anything that could be overridden, and C++ allows overriding only virtual methods (and is sufficiently different anyway)
 
9:06 AM
How to get Checked Button from `ButtonGroup` ?
This is not working:
`buttonGroup1.getSelection().toString()`
 
getSelection() returns the button's model. is that not sufficient?
 
Consider this:
 
C and C++: C is a reliable weapon, even though it's old. C++ takes lots of years to master and is very powerful, but it takes so much effort you'd wish you were using something else.
 
`buttonGroup`
^
|
`jRadioButton1`
`jRadopButton2`
How to get name of Selected jRadiobutton ?
in a buttongroup?
 
Looking at SO user listing, there are users who made the mistake of using name "Override". They must get a lot of false alarm messages.
 
9:12 AM
Like -Java and -.NET are two names of radio buttons, how to get Java (supposing java is checked)?
 
@M.S. You have to write the jRadioButton to a variable to use them later.
 
You'll probably need to compare the button's models to the model returned by getSelection(). I'd first check though that the actual button is needed. It may well be that the model is enough.
 
You can't $('post') like other languages, it has to be stored somewhere to access.
 
Why is there line-through here?
using NetBeans
 
NetBeans?
 
9:18 AM
yes
 
I've created a poll related to which IDE our developers use for coding in Java.
3
Moved to JavaScript room. Java != JavaScript, please ask in the appropriate place.
 
I'm too dumb to know the difference between different eclipses. I don't do EE but what's the difference between Standard and Java
 
9:33 AM
I am unable to get values of jTextBoxes from one jFrame to another, using accessor methods like String getNameVal()
How to call these methods from another jFrame?
 
Does not seem to map directly to the setup I use. I have the plugins that I use, and none of the pre-made packages. I'll just select one at random
@M.S. In what way you're unable? Lacking a reference to the other window? As a side not, it's not usually a good idea to have multiple top level frames, see: stackoverflow.com/questions/9554636/…
 
then?
what should be used?
@kiheru soln?
 
9:49 AM
Instead of multiple JFrames? A dialog is the most common better alternative, but the top answer there gives several other choices depending on the situation. (The second highest answer gives nice counter argument for the situations where multiple top level windows actually is a good idea).
To answer the question, I don't have sufficient information. I tried to ask for clarification.
 
22 hours ago, by Unihedron
2 days ago, by Unihedron
user image
 
What is the function that makes gives the button and effect when you hover your mouse over it?
 
@Sabಠ_ಠ style:hover?
 
not sure how to use it
I want the button to get back to it's original style actually
when i check a pawn the possible buttons get a border and then after the move the buttons are set to no border
 
akn
Hello, any groovy master here?
 
10:00 AM
but then the hover effect goes and the button appears disabled when you hover on iit
 
@akn What you mean by groovy?
 
akn
i have problem with using mysql in groovy app
i did the annotations: `@Grab(group='mysql', module='mysql-connector-java', version='5.1.13')
@GrabConfig(systemClassLoader=true)`, but i still got an error "no suitable classloader found for grab"
 
What's a groovy app?
 
akn
ok.. nvm
 
10:04 AM
Dat gremar natsi
I cri everitiem
;-;
My Jbutton is losing its original border hover and effect how to i put it back?
 
Haha, I was thinking like "WTF, Andrew commented, but didn't link to the multiple frames question?", when checking @M.S. question. But then he added the link. The hell has not frozen yet.
The hover effects are theme dependent
The SO illustration definitely looks familiar
 
10:23 AM
in Tavern on the Meta on Meta Stack Exchange Chat, 33 secs ago, by Infinite Recursion
I like the "I agree" banner on the top @Uni. The person has covered every part in great detail, and it's funny. It's the nicest criticism of SO that I have seen till now, unlike the lazy blogs where people rant about how bad SO is. This one is the best.
 
 
2 hours later…
12:21 PM
oh my goodness
this room is dead again :'(
@kiheru there buddy?
 
hiya @Sab
 
hallo @uni :D
@Uni I can't revert my buttons to their normal form
any idea?
Basically I got a method which adds a border to a button
but when I remove the border in another method, the button still works but it loses it's original swing style
how do i revert it?
done
My JButton pls
it's not sexy like that :(
 
Hmm...
 
@Sab : what did u mean by sexy button ?
 
It's like the buttons should have sexy lingerie and not be naked
gtg c ya laterss
 
12:36 PM
 
1:04 PM
@Unihedron there?
 
no
 
good!
lemme paste the code
gimme 1 minute
here
in summary select possible moves will set the JButton border of some JButtons in my grid to Red
and undoPossible moves will remove the borders
but when the borders are removed they lose the initial border style of the JButton when I first created it!
 
 
2 hours later…
3:21 PM
@Sabಠ_ಠ I can't see the paste, but you could store the default border. Call getBorder() on some newly created button, and store it to a field defaultBorder, for example. Then you can set the border to that whenever you need it
 
@Unihedron @kiheru a question for ya
 
It's not a question, but instead a picture, which doesn't load.
 
Ugh, unformatted code.
one second..
 
try now
 
4:15 PM
I had a chatroom, which is now frozen due to inactivity. how can I make it active again.
 
@afzalex You can't. That's why you gotta bump a room to keep it alive.
 
4:31 PM
oh! :(
 
So eh... We will all have a moment of silence for your room. What was it called?
 
Java to android
There is no way to make my room back active?
 
4:54 PM
use this room it's the same

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
 
Okay :)
Actually I wanted to be owner of 1 room
 
Be a good participant and they might make you an owner..
 
gotit.
 
 
2 hours later…
7:21 PM
hello
 
7:32 PM
1
Q: Jython - Correct way of creating class instances & executing methods from Python class

Ben BeriI have a Python file which contains a class. I need to create an instance of that class and be able to call methods in that through Java. I came up with a solution like this: PythonInterpreter r = new PythonInterpreter(); r.execfile("File.py"); PyObject p = r.eval("Car().begin()")...

Please.. im tired of this :C
 
7:46 PM
@BenBeri I really don't do python, but does not "Car().begin()" create a new instance of Car - so the default myvar gets used
I think you need to use the Car instance where you called set()
Basically, assign Car() to some variable, and use that when calling begin()
That is run the code:
    class Car():
        ...

    foo = Car()
    foo.set(7)
    foo.begin()

instead of what you do
I don't have jython installed, but that's tested with the normal python interpreter
 
8:07 PM
Already figured that out, read my answer
 
ok, good
different than what I was thinking, but anyway, another way to keep a certain instance
 
 
4 hours later…
11:47 PM
hallo
@kiheru there?
 

« first day (1421 days earlier)      last day (3503 days later) »