Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 1 of 1

Thread: Package layout problems trying to make a new Swing component.

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    5
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Default Package layout problems trying to make a new Swing component.

    The basic background info:

    I copied the JSlider code from the OpenJDK repo (note that I am using the Sun packages, because this is a windows machine), and created a new component, and UI L&F class for it. I set its package to javax.swing, and the L&F classes to be in the same respective packages. Eclipse does not complain, and the program will run, but when I try to build and show the frame I get the following message:

    IllegalAccessError
    tried to access class javax.swing.plaf.basic.LazyActionMap from class javax.swing.plaf.basic.BasicRangeSliderUI

    I also tried adding the LazyActionMap file to my project, but no change.

    I should note that I do not have the OpenJDK source in this project, I just have the sun libraries linked in (and working fine), and I am specifying my files to be in that same package... I am not sure if this is the right way to do that.

    Thanks for any help.

    P.S. You can see the code I copied here: jdk6/jdk6/jdk: Manifest
    I used JSlider, plaf/SliderUI.java, plaf/Basic/BasicSliderUI.java as my base.
    Last edited by TheShagg; November 27th, 2010 at 11:27 PM.


Similar Threads

  1. Java Tip Jul 29, 2010 - Swing Console Component
    By helloworld922 in forum Java Swing Tutorials
    Replies: 6
    Last Post: April 16th, 2014, 12:08 AM
  2. My Custom Layout (VERY EASY TO USE)
    By aussiemcgr in forum AWT / Java Swing
    Replies: 10
    Last Post: August 5th, 2010, 01:37 PM
  3. How do you layout these components centered
    By robertbob in forum AWT / Java Swing
    Replies: 2
    Last Post: May 24th, 2010, 11:52 PM
  4. "showMessageDialog" method in swing package
    By Delmi in forum Java Theory & Questions
    Replies: 1
    Last Post: May 13th, 2010, 02:52 PM
  5. How to Use the JList component - Java Swing
    By neo_2010 in forum Java Swing Tutorials
    Replies: 1
    Last Post: July 11th, 2009, 04:02 AM