JAVAFX 实现QQ列表以及闪烁功能

JAVAFX 实现QQ列表以及闪烁功能

package ztf.start;

import javafx.application.Application;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.input.MouseEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import ztf.bean.ChatListModel;

import java.util.Random;

/**
 * @Description:
 * @Author:ZTF
 * @Date:2018/6/6 18:06
 */
public class ListViewWithImages extends Application {
   

    private final Image IMAGE1 = new Image("http://othgjp7hs.bkt.clouddn.com/18-6-8/2780393.jpg");
    private final Image IMAGE2 = new Image("http://othgjp7hs.bkt.clouddn.com/18-6-8/36061669.jpg");
    private final Image IMAGE3 = new Image("http://othgjp7hs.bkt.clouddn.com/18-6-8/35725819.jpg");
    private final Image IMAGEWHITE = new Image("http://othgjp7hs.bkt.clouddn.com/18-6-8/75659527.jpg");
    private Image[] listOfImages = {IMAGE1, IMAGE2, IMAGE3};

    @Override
    public void start(Stage primaryStage) throws Exception {

        ListView<ChatListModel> listView = new ListView<>();
        ObservableList<ChatListModel> items =FXCollections.observableArrayList (
               new ChatListModel("aaa","1","123"),
                new ChatListModel("bbb","2","123"),
                new ChatListModel("ccc"
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值