小编Sha*_*eem的帖子

JOptionPane:parentComponent没有有效的父级

我正在尝试编译此代码,但是在使用套接字编程的聊天系统中出现运行时错误,服务器成功启动,但是当我运行ClientChatApp时,

java.lang.RuntimeException : JOptionPane: parentComponent does not have a valid parent
Run Code Online (Sandbox Code Playgroud)

ChatappServer

package chatappserver;

import java.net.*;
import java.io.*;
import java.util.Vector;
import java.lang.*;

public class ChatappServer {

  private static int port = 1234;
  private static ServerSocket server = null;
  private static Socket clientSocket;
  private static String line;
  private static BufferedReader streamIn;
  private static PrintStream streamOut;


  private static Vector < String > usernames = new Vector < String > ();
  private static Vector < PrintStream > streams = new Vector < PrintStream …
Run Code Online (Sandbox Code Playgroud)

java swing runtimeexception

1
推荐指数
1
解决办法
4483
查看次数

标签 统计

java ×1

runtimeexception ×1

swing ×1