From Tokyo, take the JR Joetsu/Nagano Shinkansen Line to Takasaki Station. The ride takes about 50 minutes. From Takasaki Station, transfer to the JR Ryomo Line to Maebashi Station. This leg takes approximately 15 minutes. Conversely, some areas, like Shima Onsen, can be reached by highway bus (reservations required).
From Osaka, take the JR Tokaido Shinkansen Line from Shin-Osaka Station to Tokyo Station. The train ride takes 2 hours and 30 minutes. From Tokyo Station, follow the above directions.