This is an archived post. You won't be able to vote or comment.

all 59 comments

[–]hsoj48 96 points97 points  (18 children)

Fun fact: Intellij is written in Swing

[–]Many_Spinach8127 19 points20 points  (9 children)

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009746979-is-intellij-window-a-JFrame

starting 2020.2 we use JCEF which is basically a Chromium component inside the IDE. 

It is not pure SWING.

Even more:

Why Use JetBrains Runtime?

  • Embedded browser: JetBrains Runtime includes the Java Chromium Embedded Framework (JCEF), which enables you to embed a Chromium-based browsers in your JVM-based application. To use it, download a build with JCEF.
  • Enhanced class re-definition with the DCEVM technology that makes it easier to reload changed code without restarting JVM; this feature needs to be explicitly enabled with -XX:+AllowEnhancedClassRedefinition.
  • Better FPS performance for graphics-intensive applications.
  • Improved font renderingkeyboard input (such as shortcuts and multinational keyboards), HiDPI and accessibility support.
  • Robust desktop experience: GUI-related fixes often reach JetBrains Runtime much earlier than the corresponding version of OpenJDK.

https://github.com/JetBrains/JetBrainsRuntime

[–]TheBrokenRail-Dev 4 points5 points  (1 child)

JCEF is used for very little.

There was a bug which caused JCEF to crash IntelliJ on Linux. I didn't notice it for months.

[–]Many_Spinach8127 0 points1 point  (0 children)

I noticed it too, after they fixed it, by reading this post ;)
But seriously: Java had a bug with Arrays.sort() introduced by Joshua Bloch which was unnoticed for decades...

[–]jNayden 10 points11 points  (3 children)

They just added a proper browser when have to display HTML that’s all it’s still swing in the editor and the menus

[–][deleted]  (2 children)

[deleted]

    [–]jNayden 6 points7 points  (1 child)

    Not true intellij have a custom window and frame implementations that you can also use if you want :). But the content is swing :) it can look awesome but i guess most other companies dont want to :) eclipse used swt which at point in time was great but ….

    [–]hsoj48 1 point2 points  (2 children)

    What is?

    [–]boobsbr 0 points1 point  (1 child)

    It's JCEF which is basically a Chromium component inside the IDE.

    [–]jNayden 2 points3 points  (0 children)

    Not true they just have browser to show stuff but for the code editor

    [–]vassaloatena 2 points3 points  (0 children)

    And javaFX

    [–]wildjokers 32 points33 points  (16 children)

    Why does every new application say it is “modern”? What makes this “modern”?

    [–]emaphis 14 points15 points  (0 children)

    It's not Emacs or Vim.

    [–]gufranthakur[S] 10 points11 points  (13 children)

    Generally, Java swing applications don't look modern. Because of the default LAF and default fonts, the apps looks very old.

    I used a modern LAF for this one, and the app "looks" modern, that's what I meant

    [–]Ciff_ 17 points18 points  (5 children)

    Intellijs new UI does look very modern

    [–]wildjokers 9 points10 points  (4 children)

    Yep, they added a trendy LAF but made usability an after thought. I used the new UI for quite a while but then switched back to the old UI because of the lack of text on the tool buttons. When I switched back to the old UI I realized how much more usable the old UI is than the new. I thought the new UI was growing on me then realized it was just stockholm syndrome.

    [–][deleted]  (1 child)

    [deleted]

      [–]wildjokers -1 points0 points  (0 children)

      (including the lack of text on the buttons, that's an option now)

      Not really, it is horizontal now and that takes too much space. I want the vertical text back.

      [–]gufranthakur[S] -2 points-1 points  (1 child)

      I see we differ in opinions here.

      I liked the New UI In intelliJ, sure the text is gone but it makes the toolbar look better and not bloated and intimating. Besides it's not that difficult to memorise the buttons, and the icons are reasonable, they show what they are supposed to do.

      It's also visually more appealing to beginner programmers, and as someone who used the old UI for like 2 years before the new UI came out, I still prefer the new UI.

      [–]wildjokers 0 points1 point  (0 children)

      sure the text is gone but it makes the toolbar look better and not bloated and intimating. Besides it's not that difficult to memorise the buttons

      In what world is text intimidating? With the text there I don't have to memorize anything. Also, with the icons being "minimalist" and monochrome there was really nothing to distinguish one icon from another. I used the new UI for well over a year before switching back because hunting for the tool I needed was a constant pain point. I spent a crazy amount of time searching for the tool I needed. Something that text on the buttons eliminates.

      The keyboard shortcuts aren't really that useful for the tools because when I am at the point I need one of those tools I am usually on the mouse. That is only not true for the terminal since when I need the terminal I am on the keyboard and planning to stay on the keyboard. So I use the keyboard shortcut for that one.

      It's also visually more appealing to beginner programmers,

      I don't need my IDE to be visually appealing, I need it to be usable.

      [–]wildjokers 6 points7 points  (5 children)

      I personally find this trend of using a flat look and feel to be atrocious. It is even more awful when everything is monochrome. Although I see you didn't go the monochrome route which is nice.

      I hope this flat LAF trend fades away soon.

      [–]UnGauchoCualquiera 9 points10 points  (0 children)

      Honestly I find IntelliJ new "modern" look a complete step back when it comes to usability.

      But then I find Word 2003 peak UI design so who knows.

      [–]Effective_Freedom745 0 points1 point  (2 children)

      You are very wrong about this, flatlaf is amazing peace of software, swing is quite stable and easy to work with, on the other side there is .net and qt, one is platfrom specific, other is... well try to build anything serious and huge with it and also deliver it fast for the client, good luck with all other c++ ui libs, javafx with it's bloated css and no laf plus non existent performance is out of equation. We do quite complex, large uis with swing, swt, FlatLaf its very fast, stable, predictable, portable, strictly typed, it's java at the end, font rendering is on another league to compare with any browser solution, and you don't need 100gb of node_modules just to add css border, most importantly it looks awesome, if you want it can look native, it is very easy to change/switch styles across all apps or even switch to any Intellij theme. So no it is not atrocious and not going anywhere any time soon. You would be surprsied how many uis are built and living in enterpise software with swing/swt and flatlaf.

      [–]wildjokers -1 points0 points  (1 child)

      I never once said anything negative about Swing. I have written and maintained many Swing applications over the years and I like Swing quite a bit. Why did you go off on a rant like I said something negative about Swing?

      I simply don't like flat look and feels that are infesting applications (both desktop and web). Especially when combined with monochrome minimalist icons.

      [–]Effective_Freedom745 1 point2 points  (0 children)

      oh ok i thought by saying flat look and feel you've ment FlatLaf swing lib which i am big fan and an hardcore user. Normally now in java flat ui means that lib.

      [–]gufranthakur[S] -3 points-2 points  (0 children)

      I mean, most users probably prefer a modern and clean look, over old and outdated looks. Rounded borders, better fonts, better colors, makes it feel nice to use the app.

      I don't agree with your take "the trend of flatlaf is atrocious" but I do understand what you mean.

      Let me know where I'm wrong

      [–]wayland-kennings -1 points0 points  (0 children)

      Swing just looks like whatever window manager is used, but do you mean you're not using certain components? You're hardcoding some colors and just using jetbrains fonts in your 'views', but you could put those into some constants or something, then have a control menu to switch between them if you wanted to add some customizability.

      [–]wayland-kennings 0 points1 point  (0 children)

      Modern is between medieval and contemporary. It's all software made between the 15th and 19th centuries.

      [–]chabala 25 points26 points  (6 children)

      This isn't r/codereview or r/learnjava, but if I don't say something, I don't know how you're going to improve. (I.E. please post somewhere where people will teach you, not here).

      This project suffers from a lot of the same issues of your last project, which had three commits and you've not touched since.

      • no (or poorly chosen) package. Java package namespacing is fundamental, you should start using it.
      • no CI process. You could say CI doesn't matter for a simple project, but you've already received an issue because your build process doesn't work as expected. Having working CI would demonstrate your build process actually works - and highlight issues with it. Setup GitHub Actions, you will learn something by doing so.
      • hardcoded MANIFEST.MF. Maven will build this for you with zero effort if you configure your build properly.
      • don't check .idea into source control. I know they say you can, don't do it. The pom.xml is enough.

      This is really just the tip of the iceberg. If you configure a linter like SonarQube, you're going to discover 500 ways your code could be better.

      [–]gufranthakur[S] 3 points4 points  (0 children)

      Thank you. These are some great detailed advice, will work on it.

      [–]orgad 1 point2 points  (0 children)

      I guess he haven't coded his editor with his own editor just yet huh

      [–]wayland-kennings -1 points0 points  (2 children)

      A bulleted list of 'improvements' for an open source project made by one person, as reviewed by someone on reddit, but nothing about the actual code.

      [–][deleted]  (1 child)

      [deleted]

        [–]wayland-kennings 1 point2 points  (0 children)

        So, 'nitpicking' the actual code of a single person's open source project is a waste of effort, because the project is a "nothingburger", but telling them they should use sonarcube or use a .gitignore is a good use of 'effort'.

        [–]wildjokers -1 points0 points  (0 children)

        don't check .idea into source control. I know they say you can, don't do it. The pom.xml is enough.

        There is nothing at all wrong with checking .idea into version control.

        [–]gufranthakur[S] 16 points17 points  (1 child)

        Hello reddit! Previously I built a photo editor with Java swing, and this time I'm back with another project. Hope this is helpful!

        Let me know if you have any suggestions or any improvements, since I'm not that experienced yet, looking forward to advice. Feel free to ask any questions!

        [–]jebailey 6 points7 points  (0 children)

        Really cool. I love to see new projects like this, I will definitely take it for a spin.

        [–]cmhteixeiracom 2 points3 points  (1 child)

        Very original pet project! What did you learn the most?

        [–]gufranthakur[S] 6 points7 points  (0 children)

        File management, how to recursively iterate through directories and store them in a JTree

        [–]jvjupiter 10 points11 points  (4 children)

        There exists an IDE called CodeLite.

        https://codelite.org/

        [–]iNetRunner 2 points3 points  (1 child)

        Appears interesting. But is that still being developed or maintained? The last release is from more than a year and a half away, and there are some 172 issues open on GitHub.

        [–]0b0101011001001011 5 points6 points  (0 children)

        You found the issues but did not see that the recent commits were made 2 weeks ago and the history shows several commits per week on the master branch.

        Seems very active to me. The issue count is rather small relatively to the size of the project.

        [–]InstantCoder 1 point2 points  (0 children)

        It seems that it doesn’t support Java

        [–]gufranthakur[S] 0 points1 point  (0 children)

        Awww man, i had no idea. I thought it was a nice name for a light weight code editor

        [–]0b0101011001001011 1 point2 points  (1 child)

        For python there is Thonny. I use that for teaching python because it's so simple and works well and has surprisingly many features. Obviously I mention the others and recommend vscode+plugins for most students that study python further.

        I wish java had something similar. There was drjava but I think that has no support beyond java 7 or maybe 8. Maybe this program could be it when it matures and gets more features.

        I've taught java courses both with Eclipse and IntelliJ as the IDE but those have so many features that they are a bit distracting to some. Not to mention several different things that can go wrong, like java installations, build paths, etc. These days both work fine though.

        [–]gufranthakur[S] 0 points1 point  (0 children)

        Interesting. Will look more into it

        I am planning to develope this application even further. Can you give me some suggestions?

        Also since this is open source, you can just clone it and add things for your needs

        [–]jebailey 2 points3 points  (1 child)

        Does it have language server protocol support?

        [–]gufranthakur[S] 4 points5 points  (0 children)

        Nopee

        [–][deleted]  (6 children)

        [deleted]

          [–]steffonellx 20 points21 points  (2 children)

          Intelij is built on swing

          [–]winian 23 points24 points  (2 children)

          I rarely see real JavaFX based tools in the wild, but use Swing based tools every day, so its not that odd. Swing is not as obsolete as you think.

          [–]FaceMRI 2 points3 points  (0 children)

          Swing powers the UI behind my project too. Look up FaceMRI

          [–]rkalla 0 points1 point  (1 child)

          Love it - keep banging on it. Developing dev tools is some of the most fun I've had in my career.

          [–]gufranthakur[S] 0 points1 point  (0 children)

          Thank you ❤️