Adding Tabs to Frame - Java Extra 38

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

ความคิดเห็น • 9

  • @imthebestmatrix
    @imthebestmatrix 3 ปีที่แล้ว

    Welcome back!

  • @raviel498
    @raviel498 3 ปีที่แล้ว

    JavaFX and Scenebuilder make things so much easier in my opinion. But I understand that some people like Swing.
    Like your video 👌🏽

  • @bommijn
    @bommijn 3 ปีที่แล้ว

    Thanks for the new video

  • @MvpMartell
    @MvpMartell 3 ปีที่แล้ว

    Great video Rui Snow. I'm thinking this can be used an inventory screen or a way for player to reach a main menu screen. I like it. On a separate note I was wondering if you will do a video of How to create and implement an array list of images. There are a couple on TH-cam but for some reason I can't grasp on to how they are explaining it. I have seen over 50 videos of you explaing the toughest java topics and can understand it pretty much of his watching it one time. When you did the inventory tutorials I watched them twice tho. Cookie clicker I watched twice as I were intoducing new concepts. Tornikaku, Ryi Snow San wa ichiban sensei Desi. Domo Artigato gozimasu.

    • @RyiSnow
      @RyiSnow  3 ปีที่แล้ว

      Can you be a bit more specific about the array list? That's a pretty vague question and I have no idea which part of the array you don't understand. And my name is not Rui (it seems you keep calling me that way) Btw nihongo sugoi ne.

  • @professorx1935
    @professorx1935 2 ปีที่แล้ว

    Excellent tutorial. thanks for the help. keep your mic off the table :)

  • @MvpMartell
    @MvpMartell 3 ปีที่แล้ว

    My apologies. It's was a typo error. No disrespect. Ryi Snow. My apologies. You had made a text adventure game in which the player can obtain items like an apple or weapons like dagger or sword. Things like that. Here is how I coded part of what I'm trying to say...
    Inventory status = "open";
    playerItem[0] = "";
    playerItem[1] = "";
    playerItem[2] = "";
    playerItem[3] = "";
    playerItem[4] = "";
    public class Inventory handler implements Action Listener {
    public void action performed(Action event event) {
    String your choice = event.getActionCommand( );
    switch(your choice) {
    case "inventory button":
    if(inventory Status.equals("close")) {
    inventory panel.setVisible(true);
    itemButton1.setText(playerItem[0]);
    itemButton2.setText(playerItem[1]);
    itemButton3.setText(playerItem[2]);
    itemButton4.setText(playerItem[3]);
    itemButton5.setText(player item[4]);
    inventory status = "open";
    }
    else if (inventory status.equals("open)) {
    inventoryPanel.setVisible(false);
    inventory status = "close";
    }
    break;
    case "item1":
    itemButton1.setText(" ");
    item(0);
    break;
    case "item2":
    item Button2.setText(" ");
    item(1);
    break;
    case "item3":
    itemButton3.setText(" ");
    item(2);
    break;
    case "item4":
    itemButton4.setText( " ");
    item(3);
    break;
    case "item5":
    itemButton5.setText(" ");
    item(4);
    break;
    }
    }
    }
    So my question is this...according to the code, only text will show in the inventory slot when player picks up an item. How can the code be written so that when player picks up a sword, it will show the picture of a sword instead of of the text word "Long Sword".
    I'm making a card game and wanted to implement this so that when player draws card from the array list it would immediately show the card rather than name of the card. I can get where the picture is finally displayed meaning when the player clicks on the name of the card, it will then show the picture of the card. But I want it so that the picture appears in the array list and then the picture appears in the inventory slots. I jus want to save a step of writing extra code that's all.
    Can I make a video on that. Thank you for listening me out Ryi Snow and again apologies of me spelling your name incorrectly.

    • @RyiSnow
      @RyiSnow  3 ปีที่แล้ว

      No worries I just wanted to point it out since you were calling me Rui in your previous comments too. No offense taken.
      For your code, I think I have an idea about how to get it done. I'll check if it really works when I finish my work today so please wait for a while.

    • @RyiSnow
      @RyiSnow  3 ปีที่แล้ว

      I made a sample program and uploaded a video: th-cam.com/video/t4tH2JwmRlg/w-d-xo.html
      I used normal arrays since I thought it works good for the purpose. I've added a comment in the comment section of the video so you can see the full code.
      Hope that video helps to solve your issue and good luck on your card game development.