• 0

[Java] Any good swing website guides?


Question

So I'm mainly studying swing in java now and don't think I could feel like quitting much more, I need some serious help here because I feel like I literally haven't got a clue at what I'm doing whatsoever.

Are there any websites with plenty of examples but basic that use GUI, Swing... Every time I search for help every single website overcomplicates it ridiculously that it just confuses me and want to throw in the towel or they're in the cmd console (i.e. lack the gui).

I find what helps myself learning is when I can sort of put the pieces together, i.e. I have smaller examples and I figure how to build them up and put them together to make something bigger. Obviously this isn't how I learn completely, I try use as many text-books as I can - our recommended course one Java - How to Program by Deitel feels like it skips whatever valuable point I'm looking for. Any recommendations there from anyone?

Thanks, i'm pulling my hair out over this.. it's driving me insane

Link to comment
https://www.neowin.net/forum/topic/845902-java-any-good-swing-website-guides/
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Java Swing is an overengineered mess. Especially if you don't have much experience in programming languages to begin with, it can be frustrating to work it out.

Take a deep breath and try following the official Swing tutorial : http://java.sun.com/docs/books/tutorial/uiswing/ :)

  • 0

As Thom said, swing really is a HUGE mess. I never found a really in depth guide online, but was able to get a lot of useful information out of the Oreilly Java Swing book. It's fairly long, but it goes really in depth into the inner workings of swing.

  • 0

Swing really isn't a horrible thing.

It's based on the Observer design pattern. And the key thing to realize is that your code is "triggered." So that, once you start up some program with swing you cannot trace line by line the code it executes. This is what confused me the most when I was learning.

Swing actually creates a thread in the background (the Event Dispatching Thread, EDT) which sits and waits for user input. The code you've written may or may not ever get executed. It depends solely on the user's commands. If the user presses a button, the EDT triggers the code block you have attached (via an ActionListener).

Once you understand this, the only hard part is figuring out what component to use where and what events are triggered by what. Try out NetBeans. It has a GUI creator that is very useful for creating static (I mean, non-changing) GUIs.

PM me if you have specific questions.

  • 0
Java Swing is an overengineered mess. Especially if you don't have much experience in programming languages to begin with, it can be frustrating to work it out.

Take a deep breath and try following the official Swing tutorial : http://java.sun.com/docs/books/tutorial/uiswing/ :)

I agree. I hated Java just because of the way we had to create GUIs with it back in college and I've always felt Java is slow compared to other languages. It has its purposes but it's not something I'm interested in coding with.

Anyways, to the OP, good luck with your work. I suggest following the tutorial as well.

  • 0

Good lord. I haven't used swing in years. I used it a little in high school and did pretty well with it, and I had 1 course at college that used it, but nothing since. I don't have my old note handy, but I could try to help you if you have any specific questions.

As dontocsata already mentioned, the key concept is that you assign triggers (ie. add these two numbers, display this to the screen, ect) to events (ie. this button is pressed, some text is entered, ect.). The only other concept that you might have trouble with is containers, but that's pretty much what the name implies.

  • 0

Many thanks for the replies, really helpful. The assignment's in now, not very good but it's done and out of my hands at least for now, there's more assignments to come anyway so sure i'll still have some issues.

So that, once you start up some program with swing you cannot trace line by line the code it executes. This is what confused me the most when I was learning.

That makes a lot of sense, I was really used to that with Java in the cmd prompt you can almost translate each line. I've just been using TextPad, we've been recommended to really try Eclipse since the start of swing this year, though I either didn't set it up correctly or I find it a bit too much. As for netbeans I'll definitely try that, we were given Netbeans with Textpad last year at the start of our course though I don't recall ever once being told to use it - I stumbled across it on some tutorial and it looked really helpful but was a bit too far into my assignment, I'll give it a go though now i'm reminded!

thanks again for all the useful links + help, really appreciated guys!

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I'm team Rossmann all the way. I have the exact same NVME, altough not in an array like him.
    • It had gone weeks ago. Although thinking about it I'm on the beta.
    • They thought value of their goods would forever only drop like it used to and didn't account for sudden increase in price because of all the Ai hype. Tough luck Samsung, don't try to weasel this one out. Also American customer protection laws are a**. In Europe, you need to be compensated for a functioning product of same or better characteristics (not same price point as when it was originally bought!) if it can't be repaired and when you receive a replacement product your warranty starts from scratch because you received a different item than you previously had and old warranty thus cannot apply to it anymore. If your actual item was successfully repaired, warranty gets extended for the period the item was in service. If item is repaired to a significant extent, warranty also starts over from scratch because major part of it was replaced. Americans need to fight to get this kind of consumer protections because they are constantly getting screwed over.
    • Microsoft releases new Windows 11 Media Creation Tool with the latest updates by Taras Buria Patch Tuesday updates arrive every month, bringing users new features and security updates. To make sure customers have access to the most recent images, Microsoft also releases updates to the Media Creation Tool app, its official utility for Windows 11 installation. Today, the company pushed new ISOs to Media Creation Tool, allowing you to create images with the June 2026 Patch Tuesday updates. With the latest update, the Media Creation Tool now downloads KB5094126. It is Windows 11 version 25H2, build 26200.8655, which is also available via Windows Update. Note that the app itself remains on the previous version, which you can check in Properties > Details. The only change is that it now downloads a more recent Windows 11 build, so the only way to check is to download an ISO. The June 2026 Patch Tuesday update is a special release for Windows 11, as it brings a new performance profile to make the operating system more responsive and snappier when rendering various user interface surfaces, including the Start menu, quick settings, and more. It does so by spiking processor speeds for a brief moment, resulting in higher loads for a second or two. The so-called “Low latency profile” is rolling out gradually, but you can force-enable it with the ViVeTool app. Other changes include webcam improvements, Task Manager updates, shared audio support, and more. You can download the Media Creation Tool app from the official Microsoft website using this link. Besides MCT, Microsoft lets you download Windows 11 ISO as a file directly from the official Windows 11 website. However, you will need a third-party app to write it to your USB drive. Check out this guide if you want to know how to do that.
  • Recent Achievements

    • Week One Done
      davidbazooked earned a badge
      Week One Done
    • One Month Later
      Jamswaz earned a badge
      One Month Later
    • Week One Done
      Jamswaz earned a badge
      Week One Done
    • Rookie
      Marzoid went up a rank
      Rookie
    • Community Regular
      coch went up a rank
      Community Regular
  • Popular Contributors

    1. 1
      +primortal
      509
    2. 2
      PsYcHoKiLLa
      184
    3. 3
      +Edouard
      158
    4. 4
      Steven P.
      83
    5. 5
      ATLien_0
      75
  • Tell a friend

    Love Neowin? Tell a friend!