A JAR introduced via POM can also be seen in the external library.
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf-extras</artifactId>
<version>3.5.2</version>
</dependency>
<dependency>
<groupId>com.formdev</groupId>
<artifactId>flatlaf-intellij-themes</artifactId>
<version>3.5.2</version>
</dependency>
Usage:
import com.master.frank.projects.ascatch.Application;
import com.master.frank.projects.ascatch.ui.Init;
import com.master.frank.projects.ascatch.uiponent.TopMenuBar;
import com.master.frank.projects.ascatch.ui.form.LoadingForm;
import com.master.frank.projects.ascatch.ui.form.MainWindow;
import com.master.frank.projects.ascatch.ui.listener.FrameListener;
import com.master.frank.projects.ascatch.util.ComponentUtil;
import com.master.frank.projects.ascatch.util.SystemUtil;
import com.master.frank.projects.ascatch.util.UpgradeUtil;
import com.formdev.flatlaf.extras.FlatSVGUtils;
***import com.formdev.flatlaf.util.SystemInfo;* //This line shows a prompt indicating that the referenced class cannot be found in IDEA 2024.**
import com.master.frank.projects.ascatch.ui.UiConsts;
import javax.swing.*;
import java.awt.*;
/**
* Main Frame
*
* @author
* @since 2024/12/28.
*/
public class MainFrame extends JFrame {
private JPanel loadingPanel;
public void beforeLogin() {
this.setName(UiConsts.APP_NAME);
this.setTitle(UiConsts.APP_NAME);
// FrameUtil.setFrameIcon(this);
setIconImages(FlatSVGUtils.createWindowIconImages("/icons/asyun.svg"));
TopMenuBar topMenuBar = TopMenuBar.getInstance();
topMenuBar.init();
setJMenuBar(topMenuBar);
ComponentUtil.setPreferSizeAndLocateToCenter(this, 0.6, 0.8);
if (SystemUtil.isMacOs() && SystemInfo.isMacFullWindowContentSupported) {
this.getRootPane().putClientProperty("apple.awt.fullWindowContent", true);
this.getRootPane().putClientProperty("apple.awt.transparentTitleBar", true);
this.getRootPane().putClientProperty("apple.awt.fullscreenable", true);
this.getRootPane().putClientProperty("apple.awt.windowTitleVisible", false);
}
FrameListener.addListeners();
loadingPanel = new LoadingForm().getLoadingPanel();
add(loadingPanel);
pack();
setVisible(false);
}
}
However, in the normally imported classes, the SystemInfo class always prompts as not found.
This phenomenon in the project only occurred on two specific computers, while it was normal on other computers. I have also tried the following methods to solve this problem, but none of them worked:
- Invalidate Caches.
- Repair IDE.
- Clean Project and Rebuild.
- Clean Maven and Reinstall.
- Remove IDEA 2024 and Re - install.
All tries don't work. Thank you in advance for your help.
The capture is attached below: