Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Jgoodies no class defined error (i'm getting an exception while trying to compile a java file as - Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/jgoodies/common/base/Preconditions)
Jgoodies no class defined error [message #1865691] Thu, 09 May 2024 07:34
germ yum is currently offline germ yumFriend
Messages: 1
Registered: May 2024
Junior Member
i installed window builder and tried to run a simple program but it didn't compile and threw an error saying - "Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/jgoodies/common/base/Preconditions"


--the code --

package testing;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.LookAndFeel;
import javax.swing.UIManager;

import com.formdev.flatlaf.intellijthemes.FlatArcDarkIJTheme;
import com.formdev.flatlaf.themes.FlatMacDarkLaf;

import java.awt.Font;
import javax.swing.JButton;
import com.jgoodies.forms.layout.FormLayout;
import com.jgoodies.forms.layout.ColumnSpec;
import com.jgoodies.forms.layout.RowSpec;

public class test {

private JFrame frame;

/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
UIManager.setLookAndFeel(new FlatMacDarkLaf());
test window = new test();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}

/**
* Create the application.
*/
public test() {
initialize();
}

/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 675, 516);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(new FormLayout(new ColumnSpec[] {
ColumnSpec.decode("72px"),
ColumnSpec.decode("320px"),},
new RowSpec[] {
RowSpec.decode("187px"),
RowSpec.decode("68px"),
RowSpec.decode("76px"),
RowSpec.decode("38px"),}));

JLabel lblNewLabel = new JLabel("Hello world");
lblNewLabel.setFont(new Font("Times New Roman", Font.PLAIN, 22));
frame.getContentPane().add(lblNewLabel, "2, 2, fill, fill");

JButton btnNewButton = new JButton("New button");
frame.getContentPane().add(btnNewButton, "2, 4, fill, fill");
}
}
index.php/fa/44286/0/
index.php/fa/44289/0/
index.php/fa/44292/0/
Previous Topic:Eclipse unable to reference class ending with "$" in its name?
Next Topic:How to check if a IVariableBinding corresponds to a static effectively final variable?
Goto Forum:
  


Current Time: Wed Feb 05 06:06:08 GMT 2025

Powered by FUDForum. Page generated in 0.03331 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top