Help me learn Java
#21
(11-27-2015, 11:40 AM)Vi-Sion Wrote: so basically if you gonna use all the functions of the class you go for inheritance ,otherwise you just go for composition.

you can still use all the functions of the class if you're using composition (except protected, but i don't think there's many of those inside of jframe? i don't know i could be wrong).
you should only use it if you have to have your class extend it (e.g. you have a list of Cheat, and you want to add a FlyCheat to the list - you should use inheritance there)
or if you need your own implementation (e.g. a jframe that does fancy ui stuff)
Reply
#22
thx for your reply vibes you did help so far .
while learning some new stuff i got a new question, is there any difference between adding a checkbox group with 2 checkboxes and adding a button group with 2 radiobuttons ?
in my opinion there isn't but then which one should i use ?

edit:
got one more question, Choice and ComboBoxes ? they're similar just the look changes a bit but i've heard that Choice should be used when you have only few options and ComboBoxes when you have a big number of options .
was only wondering if that's true

ps:if my questions are annoying you guys just let me know i'll fin another way to learn
Reply
#23
(11-27-2015, 04:40 PM)Vi-Sion Wrote: thx for your reply vibes you did help so far .
while learning some new stuff i got a new question, is there any difference between adding a checkbox group with 2 checkboxes and adding a button group with 2 radiobuttons ?
in my opinion there isn't but then which one should i use ?

edit:
got one more question, Choice and ComboBoxes ? they're similar just the look changes a bit but i've heard that Choice should be used when you have only few options and ComboBoxes when you have a big number of options .
was only wondering if that's true

ps:if my questions are annoying you guys just let me know i'll fin another way to learn

well you'd only need one checkbox with two options, so the checkbox would save more space
you can also use a JToggleButton (i think its called that but idk because i havent messed with that in a long time)

never even heard of choice, so can't help you there

i've never done a lot with java's gui toolkit except for making a theme or two and a gui for some hacks, so i can't help a lot unfortunately
Reply
#24
np vibes you helped me more then enough, i'm really grateful.
maybe PsychoCoder knows more about this .
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Java sockets 0xRar 3 8,759 12-24-2020, 12:36 PM
Last Post: 0xRar
  Useful resources to become a better Java programmer LOSTINSAUCE 2 14,369 12-21-2020, 09:41 AM
Last Post: 0xRar
  Java won't work properly QMark 2 12,261 02-12-2019, 12:25 AM
Last Post: QMark
  Confused? Need help ImArtisan 1 14,326 04-03-2018, 07:23 AM
Last Post: ImArtisan