Unable to use javax.swing library in Java Lab

I have been using code.org for several years for my AP CS Principles classes and now I am looking at this new AP CS A curriculum. I have noticed that the javax.swing library is not supported by Java Lab. My students typically import this library to use dialog boxes and to also draw shapes on a frame. Are there any plans to allow the use of this library? Also, are there any other restrictions when using Java Lab as compared to another basic IDE? Thank you.

Hi @tlsmith2! That is correct that the javax.swing library is not supported. Java Lab supports a subset of the Java API, which includes all of the libraries that students will use in the Code.org AP CSA curriculum. You can find more information about the packages that are supported in this support article.

However, we do also include packages we developed for students to create visually engaging programs, such as The Neighborhood and The Theater. Specifically, The Theater allows students to create drawings and animations consisting of shapes, images, and audio.

One of the primary goals in developing Java Lab is to ensure that the IDE is student-friendly and easy for beginner programmers to use. Because of this, there are several key differences between Java Lab and other IDEs, and we are continuing to make improvements to Java Lab. We would love to hear your feedback and suggestions on things that you notice are not in Java Lab that you have found valuable for your students!


Hello, Jamila. Thanks for the very thorough answer to my question, which makes a lot of sense. I am planning on trying out the code-org CSA curriculum for the 2022-2023 school year. I have been teaching CSA for about 15 years now, and my course is mainly composed of homegrown presentations and assignments. I am looking forward to using CSA as the main curriculum and supplementing it with my own assignments, AP Classroom, albert.io, and codingbat. If I need to use the javax.swing library, I will just have my students use another IDE. Thanks again.

Happy to help @tlsmith2! We look forward to hearing about your experience and feedback using the Code.org CSA curriculum. These are also great resources to supplement to ensure students get sufficient practice for the AP CSA Exam. We do indicate in the unit overviews and lesson plans which topic questions and progress checks are suggested since the curriculum implements a different sequence than the suggested sequence in the CED. That might be helpful as you’re deciding where to incorporate supplemental resources.