JavaFX Java GUI Tutorial - 25 - CSS Themes and Styles

Поділитися
Вставка
  • Опубліковано 10 жов 2024

КОМЕНТАРІ • 89

  • @ryanfoothills6059
    @ryanfoothills6059 6 років тому +45

    IntelliJ supports 'exact' Stylesheet addition, only in the Ultimate Edition.
    HOWEVER, in the Community Edition, simply add a "File", and save it as a .css.
    Also, you'll need to place the stylesheet in a/the "Resources" directory, in order for the compiler to find it.

  • @mrt8096
    @mrt8096 8 років тому +18

    Those of you who can't find the menu item "Stylesheet" in the IntelliJ IDEA should add the file extension manually.
    Steps:
    1. Right click on the "src" folder.
    2. Hover over "new >".
    3. Click on the menu item "Edit File Templates...".
    4. Press the big green plus (Create Template (Insert)) on the left top side of the new window that showed up.
    5. Type in the name section "Stylesheet".
    6. Type in the Extension section "css".
    7. Press the OK button.
    Now you'll find menu item "Stylesheet" under "new >".
    Good luck!

    • @gazimohib4201
      @gazimohib4201 7 років тому

      But when i want write code on style sheet,it didn't give any auto suggestion....how can solve it.

    • @crazedbrazy617bh
      @crazedbrazy617bh 7 років тому +1

      its because you are using Community Edition of Intellij. You need Ultimate version for CSS. However if you are a student you can get it for free. Just search intellij student free

    • @Ele20002
      @Ele20002 7 років тому

      Does that count for 6th formers?
      I don't take a computing course - this is a hobby. I plan to do CS in 2 years at Uni

  • @daviduntalan
    @daviduntalan 3 роки тому +5

    i'm using NetBeans IDE and i came with trouble as with many others but here's how i solved it:
    1. simply copy your "viper.css" to your classpath (i.e., build/classes) before you run it or
    2. make an absolute path to the location where your CSS file is situated; for example my CSS file is within the folder of src/myversion/mystyle.css so my code would be the following:
    File cssFile = new File("src/myversion/mystyle.css");
    String absCssPath = "file:///" + cssFile.getAbsolutePath()
    .replace("\\", "/").replace(" ", "%20");
    scene.getStylesheets().add(absCssPath);
    Good LUCK

  • @maximilianhohl412
    @maximilianhohl412 6 років тому +6

    You are the funniest tutorial-guy I have ever experienced. You could explain operational Economics and it would be fun though. :D

  • @oguzsabitay8381
    @oguzsabitay8381 6 років тому +4

    Hey guys. If you are having problem with "Viper.css" not found then you should right click to your css file on intellij and click copy relative path and replace that path with "Viper.css".

    • @DominikZycinski
      @DominikZycinski 6 років тому

      Thanks !

    • @aniskadri140
      @aniskadri140 2 роки тому

      copied relative and absolute path but still having : WARNING: Resource not found...HELP PLEASE

  • @_erayerdin
    @_erayerdin 8 років тому +4

    Dude, I came through this episode. I enjoy your videos. :D I hope we have a chance to have a beer sometime. :D

  • @GlassedUA
    @GlassedUA 9 років тому +26

    Tried to add css to my project in NetBeans. It doesnt work by your way to add css file ) AND! When i loked whats the problen on Oracles website - woala)) We need to pass scene.getStylesheets()add(

    • @hilarymwape8536
      @hilarymwape8536 9 років тому +1

      GlassedUA You the real MVP!! was strugging

    • @albion1988
      @albion1988 9 років тому

      GlassedUA Thank you , that fix worked for me!!

    • @GlassedUA
      @GlassedUA 9 років тому

      Savvas Pit thx)

    • @666memphisto
      @666memphisto 9 років тому

      Savvas Pit Thnx man that was really helpful :)

    • @stevek517
      @stevek517 6 років тому

      scene.getStylesheets().add("proect_name/stylesheet_name.css");

  • @datnod
    @datnod 6 років тому +2

    School of the Viper, made me think of that when you named your stylesheet Viper.css :)

    • @Cecil_Augus
      @Cecil_Augus 2 роки тому

      Now he's gonna need to beat Viper in a 1v1 in AoE2

  • @usamaaslam85
    @usamaaslam85 6 років тому +1

    bucky i love you buddy. you are my inspiration.

  • @pasindulakshan7817
    @pasindulakshan7817 4 роки тому

    Best tutorial I ever found. Thank you very much! :)

  • @yourspanishstories
    @yourspanishstories 7 років тому

    diper would be a cool name, too.

  • @CheyziEdits
    @CheyziEdits 4 роки тому +1

    I still can't load the Stylesheet, it says loadStylesheetUnprivileged. Viper.css not found

    • @alexandrufilipescu1301
      @alexandrufilipescu1301 4 роки тому

      Hey, have you solved it?

    • @CheyziEdits
      @CheyziEdits 4 роки тому

      @@alexandrufilipescu1301 Yes, I solved it! I had to put it in the resources folder, like that I was able to load it as he did in the video. I'm using a maven project

    • @pettykwamboka
      @pettykwamboka 4 роки тому

      @@CheyziEdits please help me out i got the same problem you just solved, where do i find the resource folder in my project or i have to create it.

    • @samybenothman7678
      @samybenothman7678 4 роки тому

      ​@@pettykwamboka it is src folder

  • @pdpbasak
    @pdpbasak 8 років тому +4

    I'm using IntelliJ IDEA 15.0.4 but I'm not getting any options to add a new CSS file.

    • @about37cats
      @about37cats 8 років тому +2

      +Master Pradip CSS is not supported in community edition of IntelliJ IDEA only in ULTIMATE. Use JAVAFx Scene Builder for Custom GUI

    • @pdpbasak
      @pdpbasak 8 років тому +1

      Thanks :)

    • @ilutsyk
      @ilutsyk 8 років тому +5

      +Master Pradip also u can use "src -> new -> file" and manualy type "Viper.css"

    • @xLegendarium
      @xLegendarium 8 років тому

      Great! Thanks !

  • @donalmoloney2695
    @donalmoloney2695 7 років тому

    How can you call javascript functions from your java program do you have any videos or know any ones that pertain to this

  • @irgeeksauce4165
    @irgeeksauce4165 9 років тому

    Option to create new Stylesheet is not in my IntelliJ. How did you get it?

    • @nibirkabir5929
      @nibirkabir5929 8 років тому

      +IRGeekSauce Right click src select new file templates and make your own custom css file

  • @shaikhrezwanrafidahmad6771
    @shaikhrezwanrafidahmad6771 6 років тому +3

    For IntelliJ Idea Ultimate Edition:
    If you're stuck because of this error, "Viper.css" not found then simply write "yourProjectName/Viper.css" Then you're good to go.
    I tried using the community but it doesn't work, lol. If someone knows how to you css in the IntelliJ Community Edition please comment. :)

    • @crazyconan28
      @crazyconan28 6 років тому +1

      Thank you, I looked online for a similar solution that worked.
      scene.getStylesheets().add(getClass().getResource("Viper.css").toExternalForm());
      But yours is more straight forward and makes perfect sense.

  • @dullahan81
    @dullahan81 7 років тому

    Hello, i got an error when trying to setUserAgentStylesheet(STYLESHEET_CAPSIAN). It says "STYLESHEET_CAPSIAN cannot be resolved to a variable". Anyone can help me with this ?

  • @Tropax1
    @Tropax1 7 років тому +1

    Intellij keeps showing this"INFO: Could not find stylesheet: Lizard.css.

    • @hhhapz
      @hhhapz 6 років тому

      put the entire name, including the package. So like if it is in /com.youtube/Lizard.css, put that as the stylesheet name

    • @mahmoudsaleh892
      @mahmoudsaleh892 6 років тому

      thank u :*

  • @tamirmoav3774
    @tamirmoav3774 2 роки тому

    there is no color picker in the Intelij?? how can it be?

  • @mikehollowayuk
    @mikehollowayuk 6 років тому

    This still doesn't work with the css file bit. Does anyone know how to fix this in 2018 eclipse mean on mac? 🤗

  • @hichamkaid7693
    @hichamkaid7693 9 років тому +2

    how can i plugin css emmet to intellij ide ???

    • @ianarbuckle7726
      @ianarbuckle7726 9 років тому

      hicham kaid As far as I know, CSS is available on the ultimate edition only.

    • @irgeeksauce4165
      @irgeeksauce4165 9 років тому

      +Ian Arbuckle dammit. that must be why I can't find it when I hover over "New". :-(

    • @user-eh5wo8re3d
      @user-eh5wo8re3d 8 років тому +1

      +Ian Arbuckle YOu can get the ultimate edition for free if you are a student though

    • @crazedbrazy617bh
      @crazedbrazy617bh 7 років тому

      Thanks dude!

  • @alvionitatk7436
    @alvionitatk7436 6 років тому

    Hai. How to add stylesheet in the project? I can found it. Can you help me??

    • @unknownsoul7043
      @unknownsoul7043 4 роки тому

      just add a new file and save it as filename.css

  • @vaexea
    @vaexea 3 роки тому

    how do I add style sheet files in intellij
    please help ;~:

  • @shihabmanzur7957
    @shihabmanzur7957 5 років тому

    i cant add viper.css. please help.

  • @CornMCMais
    @CornMCMais 7 років тому

    "Viper.css"
    ~Bucky, 2015

  • @anasonmania
    @anasonmania 7 років тому

    how much okka reis, let us know

  • @neo4now
    @neo4now 7 років тому

    Why my "stylesheets" have extenssion xsl and not CSS ? :S

  • @mvsprabash
    @mvsprabash 3 роки тому

    May be I could use bOotStrAp ! Just Kidding!

  • @MrSOOUNG
    @MrSOOUNG 4 роки тому

    383838 threre threre~ lol

  • @tomasbedarbo699
    @tomasbedarbo699 7 років тому

    Where I can get 'setUserAgentStylesheet' parameters possibilities?
    Because I know only: (STYLESHEET_CASPIAN);

    • @Danieljoe98
      @Danieljoe98 7 років тому +1

      read Java Documentation

  • @yisusfr8383
    @yisusfr8383 Рік тому

    viper 💀💀💀

  • @GlassedUA
    @GlassedUA 9 років тому

    By tha way sorry for my eng skills ) They not really greater than my java skills))))

  • @PurplePotatoBro
    @PurplePotatoBro 3 роки тому

    h
    how

  • @aidenyang747
    @aidenyang747 4 роки тому

    I stole your theme name

  • @El_Putes
    @El_Putes 4 роки тому

    thank you my man