Skip to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dear OSbot, can you help me with this?

Featured Replies

First of all, i don't know if i may post things like this on this forum, because it's not OSbot related, but it is JavaFX related. Which is related to make bot scripts. 

 

So in class i got an assignment. We need to make a JavaFX project. 

In this project we need to add questions and RadioButtons. 

I did by making an array for all the questions. And put that into a for loop so i don't have to write a long line of code.

 

This is my for loop: 

for(int i=0; i<vragen.length; i++) {

                group[i] = new ToggleGroup();

                Label label = new Label((i+1) + vragen[i]);
                grid.add(label, 0, i);
                eens[i] = new RadioButton("eens");
                eens[i].setToggleGroup(group[i]);
                grid.add(eens[i], 1, i);

                oneens[i] = new RadioButton("Oneens");
                oneens[i].setToggleGroup(group[i]);
                grid.add(oneens[i], 2, i);

                geen_mening[i] = new RadioButton("Geen mening");
                geen_mening[i].setToggleGroup(group[i]);
                grid.add(geen_mening[i], 3, i);




            }

I'm sorry for the language, it's dutch. 

 

So this is good, but now i have a problem. The radioButtons needs to give a function. For example: 

 

Eens (Agree) = i++; (Give 1 point when you select Agree)

Oneens (Disagree) = i--; (Give -1 point when you select Disagree)

When i click on the button Submit, it should give an output. 

 

I've been struggling with this problem for ages now. You guys are my last hope.

 

Hope ya'll can help me!

 

Sincerely your's,

 

Sebastian.

Edited by Sebastian

  • Author

I'm not very familiar with JavaFX but window controls generally rely on events. Also if you want to be a serious programmer you don't write code in anything but english.

 

Thanks for the reply. As i said, it's for my school project. Our main language in The Netherlands is Dutch. My teacher wants us to program in dutch...

  • Author

They ask you to use JavaFX in school?

 

Yes. Because they think JavaFX is a good way to learn Java and work with classes.

  • Author

I got it! 

If you guys are interested, i'm willing to translate everything to english and publish it here. Could help some people who are learning basic Java.

 

I got it! 

If you guys are interested, i'm willing to translate everything to english and publish it here. Could help some people who are learning basic Java.

for(int i=0; i<questions.length; i++) {

                group[i] = new ToggleGroup();

                Label label = new Label((i+1) + questions[i]);
                grid.add(label, 0, i);
                agree[i] = new RadioButton("Agreed");
                agree[i].setToggleGroup(group[i]);
                grid.add(agree[i], 1, i);

                disagree[i] = new RadioButton("Disagree");
                disagree[i].setToggleGroup(group[i]);
                grid.add(disagree[i], 2, i);

                no_opinion[i] = new RadioButton("No opinion");
                no_opinion[i].setToggleGroup(group[i]);
                grid.add(no_opinion[i], 3, i);




            }

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.