欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Java中常用的圖片壓縮技術(shù)詳解

 更新時(shí)間:2025年06月26日 10:04:36   作者:杯莫停丶  
在Java編程語(yǔ)言中,處理圖片壓縮是一項(xiàng)常見(jiàn)的任務(wù),特別是在存儲(chǔ)、傳輸或展示大量圖像資源時(shí),Java作為企業(yè)級(jí)開(kāi)發(fā)的主力語(yǔ)言,提供了多種圖片壓縮解決方案,本文將系統(tǒng)介紹Java中常用的圖片壓縮技術(shù),需要的朋友可以參考下

一、前言:為什么需要圖片壓縮?

在當(dāng)今互聯(lián)網(wǎng)應(yīng)用中,圖片占據(jù)了網(wǎng)絡(luò)流量的絕大部分。未經(jīng)壓縮的圖片會(huì)導(dǎo)致:

  • 應(yīng)用加載速度緩慢
  • 服務(wù)器帶寬成本增加
  • 移動(dòng)端用戶流量消耗過(guò)大
  • 存儲(chǔ)空間浪費(fèi)

Java作為企業(yè)級(jí)開(kāi)發(fā)的主力語(yǔ)言,提供了多種圖片壓縮解決方案。本文將系統(tǒng)介紹Java中常用的圖片壓縮技術(shù),包含原理分析、代碼實(shí)現(xiàn)和性能優(yōu)化建議。

二、Java圖片壓縮核心API

Java標(biāo)準(zhǔn)庫(kù)提供了強(qiáng)大的圖像處理支持,主要涉及以下包:

import javax.imageio.ImageIO;          // 圖像讀寫(xiě)
import java.awt.image.BufferedImage;  // 圖像內(nèi)存表示
import java.awt.Image;                // 圖像基類
import java.awt.Graphics2D;           // 2D繪圖
import java.io.File;                  // 文件操作
import java.io.IOException;          // IO異常處理

三、基礎(chǔ)壓縮方法實(shí)現(xiàn)

3.1 質(zhì)量壓縮法(有損壓縮)

/**
 * 通過(guò)調(diào)整JPEG質(zhì)量參數(shù)壓縮圖片
 * @param srcPath 源圖片路徑
 * @param destPath 目標(biāo)圖片路徑
 * @param quality 壓縮質(zhì)量(0-1)
 */
public static void compressByQuality(String srcPath, String destPath, float quality) {
    try {
        BufferedImage srcImage = ImageIO.read(new File(srcPath));
        
        // 獲取圖像寫(xiě)入器
        Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpeg");
        ImageWriter writer = writers.next();
        
        // 設(shè)置壓縮參數(shù)
        ImageWriteParam param = writer.getDefaultWriteParam();
        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
        param.setCompressionQuality(quality);
        
        // 寫(xiě)入文件
        try (FileOutputStream out = new FileOutputStream(destPath)) {
            writer.setOutput(ImageIO.createImageOutputStream(out));
            writer.write(null, new IIOImage(srcImage, null, null), param);
        }
        writer.dispose();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

3.2 尺寸壓縮法

/**
 * 通過(guò)調(diào)整圖片尺寸實(shí)現(xiàn)壓縮
 * @param srcPath 源圖片路徑
 * @param destPath 目標(biāo)圖片路徑
 * @param scale 縮放比例(0-1)
 */
public static void compressBySize(String srcPath, String destPath, double scale) {
    try {
        BufferedImage srcImage = ImageIO.read(new File(srcPath));
        int newWidth = (int)(srcImage.getWidth() * scale);
        int newHeight = (int)(srcImage.getHeight() * scale);
        
        // 創(chuàng)建縮放后的圖像
        Image scaledImage = srcImage.getScaledInstance(newWidth, newHeight, Image.SCALE_SMOOTH);
        BufferedImage destImage = new BufferedImage(newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
        
        // 繪制縮放后的圖像
        Graphics2D g2d = destImage.createGraphics();
        g2d.drawImage(scaledImage, 0, 0, null);
        g2d.dispose();
        
        // 寫(xiě)入文件
        ImageIO.write(destImage, "jpg", new File(destPath));
    } catch (IOException e) {
        e.printStackTrace();
    }
}

四、高級(jí)壓縮技術(shù)與優(yōu)化

4.1 雙緩沖漸進(jìn)式壓縮

/**
 * 漸進(jìn)式壓縮:先進(jìn)行尺寸壓縮,再進(jìn)行質(zhì)量壓縮
 * @param srcPath 源圖片路徑
 * @param destPath 目標(biāo)圖片路徑
 * @param sizeScale 尺寸縮放比例
 * @param quality 質(zhì)量參數(shù)
 */
public static void progressiveCompress(String srcPath, String destPath, 
                                      double sizeScale, float quality) {
    try {
        // 第一步:尺寸壓縮
        BufferedImage srcImage = ImageIO.read(new File(srcPath));
        int newWidth = (int)(srcImage.getWidth() * sizeScale);
        int newHeight = (int)(srcImage.getHeight() * sizeScale);
        
        BufferedImage sizeCompressedImage = new BufferedImage(
            newWidth, newHeight, BufferedImage.TYPE_INT_RGB);
        Graphics2D g2d = sizeCompressedImage.createGraphics();
        g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 
                            RenderingHints.VALUE_INTERPOLATION_BILINEAR);
        g2d.drawImage(srcImage, 0, 0, newWidth, newHeight, null);
        g2d.dispose();
        
        // 第二步:質(zhì)量壓縮
        Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpeg");
        ImageWriter writer = writers.next();
        ImageWriteParam param = writer.getDefaultWriteParam();
        param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
        param.setCompressionQuality(quality);
        
        try (FileOutputStream out = new FileOutputStream(destPath)) {
            writer.setOutput(ImageIO.createImageOutputStream(out));
            writer.write(null, new IIOImage(sizeCompressedImage, null, null), param);
        }
        writer.dispose();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

4.2 智能壓縮算法(自動(dòng)計(jì)算最佳壓縮參數(shù))

/**
 * 智能壓縮:根據(jù)目標(biāo)大小自動(dòng)計(jì)算最佳壓縮參數(shù)
 * @param srcPath 源圖片路徑
 * @param destPath 目標(biāo)圖片路徑
 * @param targetSize 目標(biāo)大小(KB)
 */
public static void smartCompress(String srcPath, String destPath, long targetSize) {
    try {
        File srcFile = new File(srcPath);
        long fileSize = srcFile.length() / 1024; // KB
        
        // 如果已經(jīng)小于目標(biāo)大小,直接拷貝
        if (fileSize <= targetSize) {
            Files.copy(srcFile.toPath(), new File(destPath).toPath(), 
                      StandardCopyOption.REPLACE_EXISTING);
            return;
        }
        
        // 計(jì)算初始?jí)嚎s比例
        double ratio = (double) targetSize / fileSize;
        float quality = (float) Math.min(0.9, ratio * 1.2); // 質(zhì)量系數(shù)
        double sizeScale = Math.min(1.0, Math.sqrt(ratio) * 1.1); // 尺寸系數(shù)
        
        // 漸進(jìn)式調(diào)整
        BufferedImage image = ImageIO.read(srcFile);
        File tempFile = File.createTempFile("compress", ".jpg");
        
        int attempts = 0;
        while (attempts++ < 5) {
            // 執(zhí)行壓縮
            progressiveCompress(srcPath, tempFile.getAbsolutePath(), sizeScale, quality);
            
            // 檢查結(jié)果
            long compressedSize = tempFile.length() / 1024;
            if (compressedSize <= targetSize * 1.05) {
                break; // 達(dá)到目標(biāo)
            }
            
            // 調(diào)整參數(shù)
            double adjustFactor = (double) targetSize / compressedSize;
            quality *= adjustFactor;
            sizeScale *= Math.sqrt(adjustFactor);
            
            // 參數(shù)邊界檢查
            quality = Math.max(0.1f, Math.min(0.95f, quality));
            sizeScale = Math.max(0.1, Math.min(1.0, sizeScale));
        }
        
        // 最終保存
        Files.copy(tempFile.toPath(), new File(destPath).toPath(), 
                 StandardCopyOption.REPLACE_EXISTING);
        tempFile.delete();
    } catch (IOException e) {
        e.printStackTrace();
    }
}

五、第三方庫(kù)壓縮方案

5.1 Thumbnailator庫(kù)(簡(jiǎn)單易用)

// Maven依賴
// <dependency>
//     <groupId>net.coobird</groupId>
//     <artifactId>thumbnailator</artifactId>
//     <version>0.4.14</version>
// </dependency>

public static void thumbnailatorCompress(String srcPath, String destPath, 
                                       int width, int height, float quality) {
    try {
        Thumbnails.of(srcPath)
            .size(width, height)
            .outputQuality(quality)
            .outputFormat("jpg")
            .toFile(destPath);
    } catch (IOException e) {
        e.printStackTrace();
    }
}

5.2 ImageMagick集成(高性能)

// 需要安裝ImageMagick并配置環(huán)境變量
public static void imageMagickCompress(String srcPath, String destPath, 
                                      int quality) throws IOException, InterruptedException {
    String command = String.format("convert %s -quality %d %s", 
                                 srcPath, quality, destPath);
    Process process = Runtime.getRuntime().exec(command);
    process.waitFor();
}

六、性能對(duì)比與優(yōu)化建議

6.1 各種方法性能對(duì)比

方法壓縮率質(zhì)量損失速度適用場(chǎng)景
質(zhì)量壓縮可控需要保持尺寸的場(chǎng)景
尺寸壓縮明顯縮略圖生成
漸進(jìn)式壓縮很高可控較慢對(duì)大小要求嚴(yán)格的場(chǎng)景
Thumbnailator中高可控快速開(kāi)發(fā)
ImageMagick很高最小最快高性能需求

6.2 優(yōu)化建議

內(nèi)存優(yōu)化

  • 對(duì)大圖片使用ImageIO.setUseCache(false)禁用磁盤(pán)緩存
  • 分塊處理超大圖片

多線程處理

// 使用線程池并行處理多張圖片
ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
List<Future<?>> futures = new ArrayList<>();

for (String imagePath : imagePaths) {
    futures.add(executor.submit(() -> {
        smartCompress(imagePath, getOutputPath(imagePath), 200);
    }));
}

for (Future<?> future : futures) {
    future.get(); // 等待所有任務(wù)完成
}
executor.shutdown();

格式選擇建議

  • JPEG:適合照片類圖像
  • PNG:適合帶透明度的圖像
  • WebP:現(xiàn)代格式,壓縮率更高(需要額外庫(kù)支持)

七、完整工具類實(shí)現(xiàn)

import javax.imageio.*;
import javax.imageio.stream.*;
import java.awt.*;
import java.awt.image.*;
import java.io.*;
import java.util.Iterator;

public class ImageCompressor {
    
    /**
     * 綜合壓縮方法
     * @param srcPath 源路徑
     * @param destPath 目標(biāo)路徑
     * @param maxWidth 最大寬度
     * @param maxHeight 最大高度
     * @param quality 質(zhì)量(0-1)
     * @param format 格式(jpg/png)
     */
    public static void compress(String srcPath, String destPath, 
                              Integer maxWidth, Integer maxHeight, 
                              Float quality, String format) throws IOException {
        BufferedImage srcImage = ImageIO.read(new File(srcPath));
        
        // 計(jì)算新尺寸
        int srcWidth = srcImage.getWidth();
        int srcHeight = srcImage.getHeight();
        int newWidth = srcWidth;
        int newHeight = srcHeight;
        
        if (maxWidth != null && srcWidth > maxWidth) {
            newWidth = maxWidth;
            newHeight = (int)((double)srcHeight / srcWidth * newWidth);
        }
        
        if (maxHeight != null && newHeight > maxHeight) {
            newHeight = maxHeight;
            newWidth = (int)((double)newWidth / newHeight * maxHeight);
        }
        
        // 尺寸壓縮
        BufferedImage resizedImage = new BufferedImage(newWidth, newHeight, 
                format.equalsIgnoreCase("jpg") ? BufferedImage.TYPE_INT_RGB : BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = resizedImage.createGraphics();
        g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, 
                          RenderingHints.VALUE_INTERPOLATION_BILINEAR);
        g.drawImage(srcImage, 0, 0, newWidth, newHeight, null);
        g.dispose();
        
        // 質(zhì)量壓縮(僅對(duì)JPEG有效)
        if (format.equalsIgnoreCase("jpg") && quality != null && quality < 1.0f) {
            Iterator<ImageWriter> writers = ImageIO.getImageWritersByFormatName("jpeg");
            ImageWriter writer = writers.next();
            ImageWriteParam param = writer.getDefaultWriteParam();
            param.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
            param.setCompressionQuality(quality);
            
            try (FileOutputStream out = new FileOutputStream(destPath)) {
                writer.setOutput(ImageIO.createImageOutputStream(out));
                writer.write(null, new IIOImage(resizedImage, null, null), param);
            }
            writer.dispose();
        } else {
            ImageIO.write(resizedImage, format, new File(destPath));
        }
    }
    
    /**
     * 自動(dòng)壓縮到指定大小(KB)
     */
    public static void compressToTargetSize(String srcPath, String destPath, 
                                         long targetKB, String format) throws IOException {
        File srcFile = new File(srcPath);
        long srcSizeKB = srcFile.length() / 1024;
        
        if (srcSizeKB <= targetKB) {
            Files.copy(srcFile.toPath(), new File(destPath).toPath(), 
                     StandardCopyOption.REPLACE_EXISTING);
            return;
        }
        
        // 初始?jí)嚎s參數(shù)
        float ratio = (float) targetKB / srcSizeKB;
        float quality = Math.min(0.9f, ratio * 1.2f);
        double sizeScale = Math.min(1.0, Math.sqrt(ratio) * 1.1);
        
        BufferedImage srcImage = ImageIO.read(srcFile);
        int newWidth = (int)(srcImage.getWidth() * sizeScale);
        int newHeight = (int)(srcImage.getHeight() * sizeScale);
        
        File tempFile = File.createTempFile("imgcomp", "." + format);
        int attempts = 0;
        
        while (attempts++ < 5) {
            compress(srcPath, tempFile.getAbsolutePath(), newWidth, newHeight, quality, format);
            
            long compressedSizeKB = tempFile.length() / 1024;
            if (compressedSizeKB <= targetKB * 1.05) {
                break;
            }
            
            // 調(diào)整參數(shù)
            float adjust = (float) targetKB / compressedSizeKB;
            quality *= adjust;
            sizeScale *= Math.sqrt(adjust);
            
            quality = Math.max(0.3f, Math.min(0.95f, quality));
            sizeScale = Math.max(0.3, Math.min(1.0, sizeScale));
            
            newWidth = (int)(srcImage.getWidth() * sizeScale);
            newHeight = (int)(srcImage.getHeight() * sizeScale);
        }
        
        Files.copy(tempFile.toPath(), new File(destPath).toPath(), 
                 StandardCopyOption.REPLACE_EXISTING);
        tempFile.delete();
    }
}

八、實(shí)際應(yīng)用示例

8.1 Web應(yīng)用中的圖片上傳壓縮

@RestController
@RequestMapping("/api/image")
public class ImageUploadController {
    
    @PostMapping("/upload")
    public ResponseEntity<String> uploadImage(@RequestParam("file") MultipartFile file) {
        try {
            // 臨時(shí)保存上傳文件
            File tempFile = File.createTempFile("upload", ".tmp");
            file.transferTo(tempFile);
            
            // 壓縮圖片(限制最大2000px,質(zhì)量80%)
            String destPath = "uploads/" + System.currentTimeMillis() + ".jpg";
            ImageCompressor.compress(tempFile.getAbsolutePath(), destPath, 
                                   2000, 2000, 0.8f, "jpg");
            
            // 刪除臨時(shí)文件
            tempFile.delete();
            
            return ResponseEntity.ok("上傳成功: " + destPath);
        } catch (Exception e) {
            return ResponseEntity.status(500).body("上傳失敗: " + e.getMessage());
        }
    }
}

8.2 批量圖片處理工具

public class BatchImageProcessor {
    
    public static void processFolder(String inputFolder, String outputFolder, 
                                   int maxWidth, float quality) {
        File folder = new File(inputFolder);
        File[] imageFiles = folder.listFiles((dir, name) -> 
            name.matches(".*\\.(jpg|jpeg|png|gif)$"));
        
        if (imageFiles == null || imageFiles.length == 0) {
            System.out.println("沒(méi)有找到圖片文件");
            return;
        }
        
        new File(outputFolder).mkdirs();
        
        for (File imageFile : imageFiles) {
            try {
                String outputPath = outputFolder + "/compressed_" + imageFile.getName();
                ImageCompressor.compress(imageFile.getAbsolutePath(), outputPath, 
                                       maxWidth, null, quality, "jpg");
                System.out.println("已處理: " + imageFile.getName());
            } catch (IOException e) {
                System.err.println("處理失敗: " + imageFile.getName() + " - " + e.getMessage());
            }
        }
    }
    
    public static void main(String[] args) {
        processFolder("D:/photos", "D:/photos/compressed", 1920, 0.85f);
    }
}

九、常見(jiàn)問(wèn)題與解決方案

Q1: 壓縮后圖片顏色失真怎么辦?

A: 對(duì)于JPEG格式,可以嘗試:

  1. 提高壓縮質(zhì)量參數(shù)(0.8以上)
  2. 使用BufferedImage.TYPE_INT_RGB確保顏色空間正確
  3. 對(duì)于重要圖片考慮使用PNG格式

Q2: 處理大圖片時(shí)內(nèi)存溢出?

A: 解決方案:

  1. 使用ImageIO.setUseCache(false)
  2. 分塊處理圖片
  3. 增加JVM內(nèi)存參數(shù):-Xmx1024m

Q3: 如何保持透明背景?

A: 需要使用PNG格式并確保:

  1. 使用BufferedImage.TYPE_INT_ARGB類型
  2. 不要轉(zhuǎn)換為JPEG格式
  3. 壓縮時(shí)保留alpha通道

Q4: 壓縮速度太慢?

A: 優(yōu)化建議:

  1. 使用多線程處理多張圖片
  2. 考慮使用Thumbnailator或ImageMagick等優(yōu)化庫(kù)
  3. 對(duì)于批量處理,可以預(yù)先調(diào)整尺寸再統(tǒng)一質(zhì)量壓縮

十、總結(jié)

本文全面介紹了Java中圖片壓縮的各種技術(shù)方案,從基礎(chǔ)API使用到高級(jí)優(yōu)化技巧,涵蓋了:

  1. 標(biāo)準(zhǔn)庫(kù)的質(zhì)量壓縮和尺寸壓縮方法
  2. 漸進(jìn)式壓縮和智能壓縮算法
  3. 第三方庫(kù)的高效解決方案
  4. 性能優(yōu)化和實(shí)際應(yīng)用示例

開(kāi)發(fā)者可以根據(jù)具體需求選擇合適的壓縮策略:

  • 對(duì)質(zhì)量要求高:使用漸進(jìn)式壓縮或智能壓縮
  • 對(duì)速度要求高:使用Thumbnailator或ImageMagick
  • 對(duì)大小限制嚴(yán)格:使用目標(biāo)大小壓縮法

正確使用圖片壓縮技術(shù)可以顯著提升應(yīng)用性能,降低運(yùn)營(yíng)成本,是每個(gè)Java開(kāi)發(fā)者都應(yīng)該掌握的重要技能。

以上就是Java中常用的圖片壓縮技術(shù)詳解的詳細(xì)內(nèi)容,更多關(guān)于Java圖片壓縮技術(shù)的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

  • 淺談String類型如何轉(zhuǎn)換為time類型存進(jìn)數(shù)據(jù)庫(kù)

    淺談String類型如何轉(zhuǎn)換為time類型存進(jìn)數(shù)據(jù)庫(kù)

    這篇文章主要介紹了String類型如何轉(zhuǎn)換為time類型存進(jìn)數(shù)據(jù)庫(kù),具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教
    2022-03-03
  • Spring控制Bean加載順序的操作方法

    Spring控制Bean加載順序的操作方法

    正常情況下,Spring 容器加載 Bean 的順序是不確定的,那么我們?nèi)绻枰错樞蚣虞d Bean 時(shí)應(yīng)如何操作?本文將詳細(xì)講述我們?nèi)绾尾拍芸刂?nbsp;Bean 的加載順序,需要的朋友可以參考下
    2024-05-05
  • Java枚舉實(shí)現(xiàn)自增賦值的方法

    Java枚舉實(shí)現(xiàn)自增賦值的方法

    在Java編程里,枚舉(enum)其實(shí)是一種特別的類型,用來(lái)表示一組常量,當(dāng)我們開(kāi)發(fā)程序的時(shí)候,常常需要給這些枚舉加點(diǎn)其他功能,比如自增賦值的方法,這樣就能更方便地管理和使用啦,這篇文章和大家聊聊,怎么在Java中實(shí)現(xiàn)枚舉的自增賦值
    2025-04-04
  • 如何解決@Data和@Builder的沖突問(wèn)題

    如何解決@Data和@Builder的沖突問(wèn)題

    在使用@Data和@Builder注解時(shí),可能會(huì)導(dǎo)致無(wú)法使用無(wú)參構(gòu)造方法創(chuàng)建實(shí)體類實(shí)例的問(wèn)題,本文提出了兩種解決方法:一是手動(dòng)添加無(wú)參構(gòu)造并使用@Tolerate注解兼容;二是同時(shí)添加@AllArgsConstructor和@NoArgsConstructor注解,既添加無(wú)參構(gòu)造也添加全參構(gòu)造
    2024-10-10
  • 淺析Java 數(shù)據(jù)結(jié)構(gòu)常用接口與類

    淺析Java 數(shù)據(jù)結(jié)構(gòu)常用接口與類

    本篇文章主要介紹了Java中的數(shù)據(jù)結(jié)構(gòu),Java工具包提供了強(qiáng)大的數(shù)據(jù)結(jié)構(gòu)。需要的朋友可以參考下
    2017-04-04
  • 深入探究SpringBoot中的Elasticsearch自動(dòng)配置原理及用法

    深入探究SpringBoot中的Elasticsearch自動(dòng)配置原理及用法

    SpringBoot中的Elasticsearch自動(dòng)配置為我們提供了一種快速集成Elasticsearch的方式,使我們可以在SpringBoot應(yīng)用程序中輕松地使用Elasticsearch,本文將介紹Spring Boot中的Elasticsearch自動(dòng)配置的作用、原理和使用方法
    2023-07-07
  • java實(shí)現(xiàn)字符串反轉(zhuǎn)

    java實(shí)現(xiàn)字符串反轉(zhuǎn)

    這篇文章主要為大家詳細(xì)介紹了java實(shí)現(xiàn)字符串反轉(zhuǎn),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-05-05
  • Java連接操作Oracle數(shù)據(jù)庫(kù)代碼詳解

    Java連接操作Oracle數(shù)據(jù)庫(kù)代碼詳解

    這篇文章主要介紹了Java連接操作Oracle數(shù)據(jù)庫(kù)代碼詳解的相關(guān)資料,非常不錯(cuò),具有參考借鑒價(jià)值,需要的朋友可以參考下
    2016-06-06
  • Java?@Scheduled定時(shí)任務(wù)不執(zhí)行解決辦法

    Java?@Scheduled定時(shí)任務(wù)不執(zhí)行解決辦法

    這篇文章主要給大家介紹了關(guān)于Java?@Scheduled定時(shí)任務(wù)不執(zhí)行解決的相關(guān)資料,當(dāng)@Scheduled定時(shí)任務(wù)不執(zhí)行時(shí)可以根據(jù)以下步驟進(jìn)行排查和解決,需要的朋友可以參考下
    2023-10-10
  • 如何使用JFrame完成動(dòng)態(tài)模擬時(shí)鐘

    如何使用JFrame完成動(dòng)態(tài)模擬時(shí)鐘

    本文介紹了如何使用JFrame完成動(dòng)態(tài)模擬時(shí)鐘,需要的朋友可以參考下
    2015-08-08

最新評(píng)論