The Artima Developer Community
Sponsored Link

Java Buzz Forum
SwingSet2 Needs a Package

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Scott Delap

Posts: 1154
Nickname: scottdelap
Registered: Sep, 2004

Client / Server application developer.
SwingSet2 Needs a Package Posted: Jan 27, 2005 3:00 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Scott Delap.
Original Post: SwingSet2 Needs a Package
Feed Title: ClientJava.com
Feed URL: http://www.clientjava.com/archives/wireless_mobile.rdf
Feed Description: Client/Desktop Related Java Development
Latest Java Buzz Posts
Latest Java Buzz Posts by Scott Delap
Latest Posts From ClientJava.com

Advertisement

Have you ever set out to do something extremely simple only to have it turn into a 2 hour ordeal? This evening I was working on a simple example of a custom MetalTheme. I thought I'd be nice and launch SwingSet2 from my example framework using the new theme. Sounds simple enough. As I was coding the constructor I noticed IntelliJ didn't ask me if I wanted to import SwingSet2. Ignoring this abnormality I added:

import SwingSet2;

I was promptly greeted with this upon compile:

'.' expected

WTF, this class exists and now I can't use it. A quick Google search turned up Importing Unamed Packages. Apparently as of some 1.4 release, you can't import a class without a package. I thought about modifying the SwingSet2 code but that seemed counter productive since I would have to modify all the other "special" classes in the SwingSet2 demo that think they are too good to need a package. So I opted for the alternative solution presented on the page I found on Google. I installed a copy of Java 1.3.1 on my Windows box and created a wrapper class with a package that contains a method to launch SwingSet2. I then copied the compiled class into the classpath of the IntelliJ project on my OS X machine and all is happy ... an hour after I started.

Read: SwingSet2 Needs a Package

Topic: Using JasperReports with AppFuse and Spring Previous Topic   Next Topic Topic: qotd

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use