在126至144像素之间未检测到鼠标单击

时间:2019-06-27 19:07:46

标签: java swing jframe mouse mouselistener

我正在制作游戏,并且已经实现了鼠标,但是当我在某个点单击时,未检测到单击。我做了一个自定义的MouseListener(像一个变量)。可变框架是一个JFrame,我使用方法mousePressed

from pathlib import Path

def find(file_name):    
    with open(file_name,'r') as f:
        text = f.read() 

    customer = re.findall(r"^CUSTOMER:[\s](.*)\d+", text) 
    amount = re.findall(r'\((.*?)\)', text)

    return customer, amount

file_dir = Path("path_to_directory_containing_files") # CHANGE THIS
all_files = file_dir.glob("*.txt") # this should be whatever pattern that matches all the input files
results = [find(f) for f in all_files]

0 个答案:

没有答案